This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
If the first argument of sigaction() was a string, not a number
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 18 Jun 2003 09:08:47 +0000 (09:08 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 18 Jun 2003 09:08:47 +0000 (09:08 +0000)
commit1d81eac947dedbd62bc60aa6d92509cbe424fa3d
tree7208914cda1ad4fe5944e45bba725cf8c62bacf5
parent702815ca71820e02fb479da23518a6420e31af8b
If the first argument of sigaction() was a string, not a number
(or a SIGXXX 'constant') one got first (if using -w) 'Argument "FOO"
isn't numeric in subroutine entry ...' but after that one got
(depending on the OS) either a coredump (because of trying to
assign to *0 in mg_get) or a hang (because of the sigprocmask()
blocking signals inside POSIX::sigaction, a nasty hang since
one obviously cannot interrupt it...only SIGKILL works).
In older Perls (tried with 5.6.1) one got 'No such signal: SIGZERO ...'
because of the string becoming zero due to the XS typemap magic.
Resolved by making the POSIX::sigaction to try harder to figure
out a valid signal number (one still gets the warning, though),
and returning undef if no sense can be made.

p4raw-id: //depot/perl@19809
ext/POSIX/POSIX.pod
ext/POSIX/POSIX.xs
ext/POSIX/t/sigaction.t