in reply to Re: Handling program output in real time
in thread Handling program output in real time
Basically, as other users mentioned, perl internally does something along the lines of (psuedo-code):
Not that FIFOs aren't useful, they just don't have anything to do with this particular problem. If, for example, he had no control over the output of this "blackbox" and it wanted to write to a named file... well then a FIFO would be really useful, because he could replace the named file with a named pipe (FIFO), and all would be cool. Here, though, the guy's already got an anonymous pipe... so swapping it with a named-pipe isn't gonna really change anything.if (-t STDOUT) { line_buffer STDOUT; } else { block_buffer STDOUT; }
|
|---|