Using Stdio.stdin()->read(10) will also *hang* the process until some data is availble on stdin. Even without read callbacks. What should we do, what should we do....
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2003-03-19 15:38: Subject: I/O callbacks in blocking mode
The reason I think it is ugly is that it isn't robust. It will cause the process to *hang* if started in such a way that other some other process competes for the stdin data. If the program reads stdin and a socket (say an X interface), I want to be able to interact with it through the socket even if something fishy happened to its stdin.
To me, this is a corner where unix is simply braindamaged, and there's no way to deal with it that I particularly like.
/ Niels Möller ()