http://qs321.pair.com?node_id=1173836


in reply to Re: sysread/syswrite wrappers
in thread sysread/syswrite wrappers

Ok, your point very similar to answer above.
Probably my case limited to IPC communications then. It's pipes, localhost only.
I don't see reason to do non-blocking reads then. If data sending process is write whole message at once, say with
syswritefull($fh, sprintf("%08d", length($line))) && syswritefull($fh, $line)
it will be read by receiving process very fast (unless whole system unresponsive/swapping), and if sending process crashed/dies, there will be eof. Blocking pipes and reading whole message at once looks ok to me.
With blocking pipes you can still select() between them to determine which process sent you next message to read.