in reply to Re^2: forked kid can't read from IO::Select->can_read
in thread forked kid can't read from IO::Select->can_read
I usually use select immediately before each sysread, trying to read big chunks of data at one time. But I do this because, in the mean case, I manage more than one handle at one time, so I use select to make an intelligent wait upon multiple sources. If you only have to read from one handle, you'd probably go for a non-blocking read (if you have to do something else while data is arriving, of course).
And yes, I admit that I cheated a bit in my answer, because I added a "\n" in the data sent by the father, and a chomp in the kid :)
Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')
Don't fool yourself.
|
|---|