in reply to Re: SIGHUP handler "IGNORE" not defined.
in thread SIGHUP handler "IGNORE" not defined.

Is there a reason you need to use sigtrap? As the parent post mentions, perldoc perlipc states that perl will try to ignore the action if it is set to 'IGNORE', or use the default action if it is set to 'DEFAULT'.
Is this a bug in the perldoc? Or is there some other reason for this?
  • Comment on Re^2: SIGHUP handler "IGNORE" not defined.

Replies are listed 'Best First'.
Re^3: SIGHUP handler "IGNORE" not defined.
by sh1tn (Priest) on Feb 08, 2005 at 22:49 UTC
    It is also written in perldoc perlipc:

    Handling the SIGHUP Signal in Daemons
    ...
    Not all platforms automatically reinstall their (native) signal handlers after a signal delivery.
    This means that the handler works only the first time the signal is sent.
    The solution to this problem is to use POSIX signal handlers if available, their behaviour is well-defined.
      Thanks, and that probably explains the original problem.
Re^3: SIGHUP handler "IGNORE" not defined.
by scottb (Scribe) on Feb 08, 2005 at 22:45 UTC
    I second the question... I have been aware all along that I could "manually override" what would seem to be the proper behaviour of 'IGNORE' by creating my own do-nothing subroutine. But the purpose of my question was to find out exactly what was going wrong under the circumstance, contrary to the documentation.