
When you open a pipe to a child process, the default I/O mode is
"fully buffered."  This means that unless the child process explicitly
flushes its output buffer, you'll only receive data when the system
buffer fills up.  The best way to get around this is to allocate a
pseudo-terminal for the child process (so it defaults back to line-buffered
I/O.) 

It occurred to me that setiview (the inspiration for this program) must've 
had to deal with the same problem, so in the traditional spirit of GPL'ed 
software, I just went and stole Andy's pty code.  :)

(I modified it slightly to make it fit into my code..)

From his README:

Oh, another thing.  setiathome doesn't fflush whenever it outputs anything.
For a while, I thought I had written this program and then realized it'd
never work anyway (because I originally tried to pipe setiathome's output
to it instead of forking it myself).  Then I realized I could allocate a
pseudotty to work around this, so that's what it does.  I'd prefer not to
have to do this, but there's no seti@home source.  Anyway, I should warn
you that it doesn't chmod the tty device or do any security checks, so
someone could theoretically search out the tty it allocates and start
interjecting false data.  I'm not too worried about this myself.


