Subject: | does not set safe signals properly |
Hiya,
Thanks for a handy module :-)
I've just noticed that Sys::SigAction doesn't set 'safe' signals correctly:
sub mk_sig_action($$)
{
my ( $handler ,$attrs ) = @_;
...
my $act = POSIX::SigAction->new( $handler ,$mask ,$attrs->{flags} ,$attrs->{safe} );
return $act;
}
Problem is, POSIX::SigAction->new() doesn't take the 4th parameter to mean 'SAFE':
package POSIX::SigAction;
use AutoLoader 'AUTOLOAD';
sub new { bless {HANDLER => $_[1], MASK => $_[2], FLAGS => $_[3] || 0, SAFE => 0}, $_[0] }
I'd suggest fixing this by either:
my $act = POSIX::SigAction->new( $handler ,$mask ,$attrs->{flags} ,SAFE => $attrs->
{safe} );
or, in keeping with the API docs:
my $act = POSIX::SigAction->new( $handler ,$mask ,$attrs->{flags} );
$act->safe( $attrs->{safe} );
hth,
-Steve