in reply to Re: child process killing
in thread child process killing

Thanks, but I do plan to exit the first process when it's inside the backticks sometimes, would you know of any to do that and have the child process die?

Replies are listed 'Best First'.
Re: Re: Re: child process killing
by chromatic (Archbishop) on Oct 19, 2001 at 02:55 UTC
    You may plan to exit, but what merlyn is saying is that the backtick operator isn't interruptable. You may be thinking of fork, which lets the parent and the child go their merry ways.

    I'm not sure what would happen if the parent caught a signal while waiting for the backtick operation to complete, but it's possible you could interrupt the process there and exit the whole program. The only other possibility that comes to mind is causing a core dump or a segfault, and if you do that, the Perl 5 Porters would probably like to know how.

    In short, the backticks operator tells perl "run this program, wait for its output, and give it to me". You're not likely to get it to skip the second and third steps. (By "not likely", I mean, "even if you do find a way, you probably won't like the results.")