News for hackers. Stuff that matters.
Re:How to write to stderr so people will like you by jrockway on Friday April 16, 2010 @01:39PM (#1271276)
If the process you're piping to never reads stdin and your process writes to stdout with a blocking write, you will eventually be blocked. But just use an event loop for stdout, and all will be well. (That way your program is in control of its own buffering and blocking. select is probably good enough in this case.)

Anyway, if you want to see freakin' echo block because of this, try:

   $ mkfifo foo
   $ echo "OH HAI" > foo
   <blocks>
In another xterm:

   $ cat foo
<echo unblocks and exits>.

There are no comments on this comment yet.