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.
In reply to Re^5: Please suggest a non-forking way to do this (OS: windows)
by ikegami
in thread Please suggest a non-forking way to do this (OS: windows)
by cranky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |