in reply to Re^5: open2() in Windows
in thread open2() in Windows
... 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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: open2() in Windows
by bhaveshbp (Initiate) on Jul 23, 2007 at 17:59 UTC | |
by BrowserUk (Patriarch) on Jul 23, 2007 at 18:12 UTC |