0xbeef has asked for the wisdom of the Perl Monks concerning the following question:
I have code that does this _slowly_ - maybe since I'm not buffering the reads from the pipe, but handling each line of output in terms of measuring size/duration. I cannot think of any other way of enforcing time/size thresholds on the child process... I'm hoping an enlightened monk would have a clever trick for something like this?
Conditions:
1. Child process' stdout and stderr must be processed in seperate handles.
2. exec'd child cannot run for longer than xx secs
3. exec child's stdout and stderr must not exceed x lines/size
0xbeef
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Redirecting stdout/stderr to pipe
by betterworld (Curate) on Sep 19, 2005 at 11:49 UTC | |
by 0xbeef (Hermit) on Sep 19, 2005 at 15:06 UTC | |
Re: Redirecting stdout/stderr to pipe
by Roy Johnson (Monsignor) on Sep 19, 2005 at 16:07 UTC | |
Re: Redirecting stdout/stderr to pipe
by Thelonius (Priest) on Sep 19, 2005 at 19:36 UTC | |
by 0xbeef (Hermit) on Sep 21, 2005 at 13:17 UTC | |
by graff (Chancellor) on Sep 22, 2005 at 02:13 UTC | |
Re: Redirecting stdout/stderr to pipe
by liverpole (Monsignor) on Sep 19, 2005 at 13:07 UTC | |
by 0xbeef (Hermit) on Sep 19, 2005 at 14:57 UTC | |
by graff (Chancellor) on Sep 19, 2005 at 17:51 UTC |