in reply to Re: END{} Subroutine not being called for Child process
in thread END{} Subroutine not being called for Child process
Appreciate the info on the SIGTERM trapping, that looks like it's my problem. I wasn't aware that sending a kill signal just blew the program out of the water; I think that comes from never having had to code in this context before.
I've been considering moving STD outputs to files instead of to /dev/null, although at this point, I've coded around much of what's there, so I'm not sure how much more benefit I would gain. I do switch back and forth between having those lines commented out and not; the line you were referring to in the programExit() subroutine was intended to see if I was hitting the END{} sub, and STDOUT was open when I was using it.
I assume the code you're referring to in the last paragraph is this one:
if(!($pid = fork)){ system("$parser $script"); }
I'm confused as to what you're saying, though. When I fork the process, I believed that the process in question would only run what was inside the bracket, then exit. Is that not the case? Should I be using exec(), in that case?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: END{} Subroutine not being called for Child process
by ikegami (Patriarch) on Aug 04, 2009 at 19:37 UTC | |
by SituationSoap (Acolyte) on Aug 04, 2009 at 20:03 UTC | |
|
Re^3: END{} Subroutine not being called for Child process
by ig (Vicar) on Aug 04, 2009 at 20:37 UTC | |
by SituationSoap (Acolyte) on Aug 05, 2009 at 12:51 UTC |