antifun has asked for the wisdom of the Perl Monks concerning the following question:
Bear with me, as this is kind of convoluted.
In a Perl/Tk program I am developing, I have to spawn a child process to run in the background. (It is another, separate Perl/Tk program.) Its invocation is actually done by a shell script that checks some conditions and craps out if there are any problems. There is also the possibility that the other Perl/Tk program might fail to start. All of this needs to be logged and presented to the user in a window so they can inform our support staff about the problem.
After this point, we don't really care about the output of the child program. What we would prefer to do is just pass it through to the parent's (my) STDOUT/STDERR. Dumping it to /dev/null or closing the filehandles isn't really a viable option.
My observations about the problem:
Apologies for the excessive length, and thanks in advance for any input.
---
"I hate it when I think myself into a corner."
Matt Mitchell
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Listening to a child for a while, then passing its output along
by crouchingpenguin (Priest) on May 21, 2003 at 16:54 UTC | |
by antifun (Sexton) on May 21, 2003 at 18:21 UTC | |
|
Re: Listening to a child for a while, then passing its output along
by fokat (Deacon) on May 21, 2003 at 19:21 UTC |