Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Signal handling problem

by sandfly (Beadle)
on Oct 02, 2003 at 16:57 UTC ( [id://296083]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Signal handling problem

I can't see exactly what the problem is. Is it possible the SIGCHLD is not breaking you out of the sleep?
It must boil down to one of three things:
1. Your child process isn't dying
2. The child process dies, but the parent isn't reaping it.
3. The child process dies, the parent reaps it, but %child_pids is not clear

I suggest you find out which, using ps, or similar. Most likely it's 2 or 3. Put print statements into the reaping sub; also, change the parent's sleep to sleep 1, and print the %child_pids hash every time round the while loop.

Replies are listed 'Best First'.
Re: Re: Signal handling problem
by gnu@perl (Pilgrim) on Oct 02, 2003 at 17:23 UTC
    Been there, but thanks for your help. I think I found out what it was. For some reason, even though I had blocked them, some of the signals were getting through to the child processes and it was acting on them as well.

    What I did was to assign all the $SIG{XXX} = 'DEFAULT' then reassign what I wanted in the child and it seems to work now. This isn't a permanent fix, but it will do until I have more time to track it down.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://296083]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.