in reply to Re: Signal Handler
in thread Signal Handler

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.

Replies are listed 'Best First'.
Re^3: Signal Handler
by ig (Vicar) on Dec 05, 2008 at 14:06 UTC

    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.