in reply to Re^2: handling HUP signals
in thread handling HUP signals

I haven't investigated this in every detail, but it looks to me like you're never exiting your catchHup() signal handler, once it got called. At the end of the handler you call start() which then calls $MANAGER->monitor();. At the end of that routine you have

HANGOUT: while (! $usr2) { sleep 1; } ... goto HANGOUT;

which looks like an endless loop to me...  i.e. you never leave that function, and thus you never leave the signal handler you called it from. And, as you probably know, signal handlers will not be reactivated before you have left them...

Update: Generally, it's a good idea to not do too much within a signal handler routine. In most cases it's best to just set some flag to which you can react in the main program's loop.

Replies are listed 'Best First'.
Re^4: handling HUP signals
by druidmatrix (Acolyte) on May 23, 2008 at 01:10 UTC
    Almut, you are absolutely correct. The problem was not exiting the signal handler. The solution was simply to have a global variable that is set in the catchHup handler and take the appropriate steps once that variable is set. Thanks!!!