Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: the sub-process wont exit until the parent does

by mr_mischief (Monsignor)
on Mar 02, 2017 at 18:46 UTC ( #1183455=note: print w/replies, xml ) Need Help??

in reply to the sub-process wont exit until the parent does

If you're not using something like Parallel::ForkManager then you should be using wait or waitpid to wait for your child processes. You should also investigate $SIG{'CHLD'} and determine what you want for that. If you're writing from one to the other, also consider $SIG{'PIPE'}.

If you haven't, read up on perlipc (or perldoc perlipc or man perlipc) to learn some other stuff. Also, I can definitely recommend APUE and Unix Network Programming, Volume 2: Interprocess Communication. Advanced Unix Programming by Rochkind, The Unix Programming Environment by Kernighan and Pike, and lots of other material exist that could help, too.

Replies are listed 'Best First'.
Re^2: the sub-process wont exit until the parent does
by sleepy_11 (Initiate) on Mar 03, 2017 at 01:47 UTC

    Thanks all your info. I think all 3 ways will fix this issue. And so far, I tried the " $SIG{'CHLD'}", and it works.

    I will go through the material as suggested

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1183455]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2022-12-05 21:09 GMT
Find Nodes?
    Voting Booth?

    No recent polls found