in reply to Re^4: Please suggest a non-forking way to do this (OS: windows)
in thread Please suggest a non-forking way to do this (OS: windows)
so you will need a timer to repeatedly read the fileno in the main script.
That would block. And as far as I know, it's impossible to detect whether the pipe has data waiting. (select won't work.) Perl imposes a unix view of the world, and that's problematic where the Windows and unix approach of performing a task are fundamentally different.
But polling is the indeed the answer. You could poll a queue that's populated by a worker thread that reads the child's output.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Please suggest a non-forking way to do this (OS: windows)
by zentara (Cardinal) on Sep 29, 2008 at 20:26 UTC | |
by ikegami (Patriarch) on Sep 29, 2008 at 20:38 UTC | |
by zentara (Cardinal) on Sep 29, 2008 at 21:29 UTC | |
by ikegami (Patriarch) on Sep 29, 2008 at 21:43 UTC | |
by BrowserUk (Patriarch) on Sep 30, 2008 at 15:19 UTC | |
| |
by zentara (Cardinal) on Sep 30, 2008 at 14:35 UTC | |
|