sigaction() problems
Working out an example of non-restarting syscalls I found three
problems.
- sigaction warns if there are no flags in the SigAction structure. I
think the SigAction constructor should treat the SigSet and flags
args as optional. Minimalist patch appended.
$ ./perl -MPOSIX=:signal_h -we '
sigaction 2, new POSIX::SigAction sub { }'
Use of uninitialized value at -e line 1.
$ ./perl -MPOSIX=:signal_h -we '
sigaction 2, new POSIX::SigAction sub { }, undef, 0'
$ _
- POSIX::constant warns on an arg-less macro.
$ ./perl -MPOSIX=:signal_h -lwe 'print SIGALRM'
Use of uninitialized value at /usr/local/lib/perl5/POSIX.pm line 197.
14
$ ./perl -MPOSIX=:signal_h -lwe 'print SIGALRM(0)'
14
$ _
- sigaction doesn't actually work.
$ ./perl -MPOSIX=:signal_h -we '
sigaction SIGALRM(0),
new POSIX::SigAction sub { die "alarm\n" }, undef, 0;
kill "ALRM", $$'
SIGALRM handler "CODE(0x223970)" not defined.
$ _
p5p-msgid: <12808.
852583324@eeyore.ibcinc.com>