Happy new year to all.

I didn't expect this:

tim@einstein(9):~$ mkfifo /tmp/pipe
tim@einstein(9):~$ time read -t 1 </tmp/pipe

real    0m13.514s
user    0m0.000s
sys     0m0.000s
tim@einstein(9):~$


in another terminal I did:
tim@einstein(10):~$ echo >/tmp/pipe


I had expected the read to time out after one second.

Is there any way to make read always timeout, even if the other end of
the pipe isn't connected?

Tim.


--
GLLUG mailing list
[email protected]
https://mailman.lug.org.uk/mailman/listinfo/gllug

Reply via email to