Are you sure that works on all platforms?
I don't know. I tried looking it up but could not find any pointers on it being architecture dependent. But to be sure, I can use a non blocking recv() instead of sysread() because the only time I would get to do the read operation (be it through recv() or sysread()) would be when select has given me something to read. That way my recv() wouldn't block. Is sysread architecture dependent?
And while I was looking through the monastery I found this interesting post about sysread - sysread and syswrite in tcp sockets - which says sysread attempts to read the no. of bytes it was told to.
Update: Read the recv function from perldoc - it exhibits similar behaviour - it too attempts to read the no. of bytes it was told to.