Keep It Simple, Stupid | |
PerlMonks |
Re: Re: Re: Re: Re: Closing parent CGI after fork()by edan (Curate) |
on May 31, 2004 at 14:04 UTC ( [id://357790]=note: print w/replies, xml ) | Need Help?? |
This is what I did:
Well, as you see, you're not really closing STDOUT you are reopening it to some other place. This will cause all output that would ordinarily go to your program's standard STDOUT to go to the file specified in the open call above. That includes any output generated by system calls and the like, since it's going to the same filehandle, only in a child process in that case (system simply performs a fork and exec under the hood). If you needed to get your hands on that output, you'd have to direct it to a real file instead of /dev/null, as in the STDERR example above. HTH
In Section
Seekers of Perl Wisdom
|
|