in reply to Signal Handler

You can reach down into the signal handling using stuff provided by POSIX module.

Replies are listed 'Best First'.
Re^2: Signal Handler
by lakshmananindia (Chaplain) on Dec 05, 2008 at 13:33 UTC
    But according to man perlvar

    If your system has the sigaction() function then signal handlers are installed using it. This means you get reliable signal handling.

    My system has sigaction. So why I need to use POSIX. Please clarify me on this.

      The standard Perl signal handlers are only given the received signal name as argument. There is no way to get the PID of the process that sent the signal.

      If you use POSIX::sigaction you can set the SA_SIGINFO flag so that your handler receives a hash which includes keys pid and uid (but note the warning in POSIX::sigaction that many systems do not provide this information) and the binary content of the siginfo structure.

Re^2: Signal Handler
by Bloodnok (Vicar) on Dec 05, 2008 at 13:23 UTC
    ...which, presumably, is essentially what he did in C - good call oshalla.

    A user level that continues to overstate my experience :-))