"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It have a program that collects output from o/s commands by forking a child process and reading its stdout/stderr seperately via a pipe. The duration and output of each exec() may not exceed a certain threshold, otherwise the exec'd child gets killed and the next system command gets run.
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: 0xbeef In reply to Redirecting stdout/stderr to pipe by 0xbeef
|
|