... when the child process stops giving output the while (<READ>) terminates ...
No it doesn't! That's the point.
Unless the child process closes the file handle, and so signals that it's not going to write any more output, while( <READ> ) { ... } will just wait until it writes some more.
Since you are running the child process continuously, it never closes stdout, so the parent's inner read loop will never terminate. Sorry, but that is just the way it is.
In reply to Re^6: open2() in Windows
by BrowserUk
in thread open2() in Windows
by bhaveshbp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |