Skip Menu |

This queue is for tickets about the Sys-SigAction CPAN distribution.

Report information
The Basics
Id: 5948
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Sys-SigAction

People
Owner: lab [...] lincolnbaxter.com.MAKE.ME.VALID
Requestors: salih [...] ip-plus.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: attrs.t fails on solaris
Hello, I having trouble to make Sys::SigAction work on my solaris box, could it be that I am missing something ? Thanks, SunOS Horizon 5.8 Generic_108528-29 sun4u sparc SUNW,Ultra-60 Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos horizon 5.8 generic_108528-17 sun4u sparc sunw,ultra-60 ' config_args='-d -Dcc=gcc -Dprefix=/opt/perl-5.6.1 -Dinstallprefix=/opt/perl-5.6.1 -Dotherlibdirs=/usr/local/lib/perl-5.6.1/sun4-solaris:/usr/local/lib/perl-5.6.1 -Uinstallusrbinperl -Uuselargefiles -Ubincompat5005 hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include', optimize='-O', cppflags='-fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='3.0.3', gccosandvers='solaris2.8' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4 alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-E' cccdlflags='-fPIC', lddlflags=' -W,l-E -G -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: Built under solaris Compiled at Feb 19 2003 17:26:13 %ENV: PERL5LIB="" @INC: /opt/perl-5.6.1/lib/5.6.1/sun4-solaris /opt/perl-5.6.1/lib/5.6.1 /opt/perl-5.6.1/lib/site_perl/5.6.1/sun4-solaris /opt/perl-5.6.1/lib/site_perl/5.6.1 /opt/perl-5.6.1/lib/site_perl /usr/local/lib/perl-5.6.1/sun4-solaris /usr/local/lib/perl-5.6.1 Test Results: ok 1 - use Sys::SigAction; ok 2 - sigHUP called not ok 3 - sigINT called # Failed test (t/attrs.t at line 38) not ok 4 - sig mask delayed USR1 # Failed test (t/attrs.t at line 41) not ok 5 - sigUSR called # Failed test (t/attrs.t at line 44) not ok 6 - sig mask delayed INT and USR1 # Failed test (t/attrs.t at line 33) ok 7 - sigHUP_2 called ok 8 - sigINT_2 called ok 9 - no mask/safe=0 INT_2 called before exit of HUP_2 # Looks like you failed 4 tests of 9.
From: lab [...] lincolnbaxter.com
The attrs.t tests lowlevel capabilities of POSIX::sigaction which are not available in perl $] < 5.8. So this is a bug in the test not in Sys::SigAction. I have attached a new version of this test which skips the test if $] < 5.008002. It might be that it would work with 5.8.1 but I do not have that here to test with, and its functions are not crucial to the use of Sys::SigAction. You should be good to go. I will upload a new version in the next day or so. Send me your email address if you would like to test with that prior to my upload. Lincoln [guest - Tue Apr 6 11:39:33 2004]: Show quoted text
> > Hello, > > I having trouble to make Sys::SigAction work on my solaris box, could > it be that I am missing something ? > > > Thanks, > > > SunOS Horizon 5.8 Generic_108528-29 sun4u sparc SUNW,Ultra-60 > > Summary of my perl5 (revision 5.0 version 6 subversion 1) > configuration: > Platform: > osname=solaris, osvers=2.8, archname=sun4-solaris > uname='sunos horizon 5.8 generic_108528-17 sun4u sparc sunw,ultra- > 60 ' > config_args='-d -Dcc=gcc -Dprefix=/opt/perl-5.6.1 > -Dinstallprefix=/opt/perl-5.6.1 >
-Dotherlibdirs=/usr/local/lib/perl-5.6.1/sun4-solaris:/usr/local/lib/perl-5.6.1 Show quoted text
> -Uinstallusrbinperl -Uuselargefiles -Ubincompat5005 > hint=recommended, useposix=true, d_sigaction=define > usethreads=undef use5005threads=undef useithreads=undef > usemultiplicity=undef > useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef > use64bitint=undef use64bitall=undef uselongdouble=undef > Compiler: > cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include', > optimize='-O', > cppflags='-fno-strict-aliasing -I/usr/local/include' > ccversion='', gccversion='3.0.3', gccosandvers='solaris2.8' > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 > d_longlong=define, longlongsize=8, d_longdbl=define, > longdblsize=16 > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', > lseeksize=4 > alignbytes=8, usemymalloc=y, prototype=define > Linker and Libraries: > ld='gcc', ldflags =' -L/usr/local/lib' > libpth=/usr/local/lib /usr/lib /usr/ccs/lib > libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc > perllibs=-lsocket -lnsl -ldl -lm -lc > libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-E' > cccdlflags='-fPIC', lddlflags=' -W,l-E -G -L/usr/local/lib' > > > Characteristics of this binary (from libperl): > Compile-time options: > Built under solaris > Compiled at Feb 19 2003 17:26:13 > %ENV: > PERL5LIB="" > @INC: > /opt/perl-5.6.1/lib/5.6.1/sun4-solaris > /opt/perl-5.6.1/lib/5.6.1 > /opt/perl-5.6.1/lib/site_perl/5.6.1/sun4-solaris > /opt/perl-5.6.1/lib/site_perl/5.6.1 > /opt/perl-5.6.1/lib/site_perl > /usr/local/lib/perl-5.6.1/sun4-solaris > /usr/local/lib/perl-5.6.1 > > Test Results: > ok 1 - use Sys::SigAction; > ok 2 - sigHUP called > not ok 3 - sigINT called > # Failed test (t/attrs.t at line 38) > not ok 4 - sig mask delayed USR1 > # Failed test (t/attrs.t at line 41) > not ok 5 - sigUSR called > # Failed test (t/attrs.t at line 44) > not ok 6 - sig mask delayed INT and USR1 > # Failed test (t/attrs.t at line 33) > ok 7 - sigHUP_2 called > ok 8 - sigINT_2 called > ok 9 - no mask/safe=0 INT_2 called before exit of HUP_2 > # Looks like you failed 4 tests of 9. > >
# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 1.t' ######################### use Test::More ; my $tests = 8; #BEGIN { use_ok('Sys::SigAction') }; ######################### # Insert your test code below, the Test::More module is use()ed here so read # its man page ( perldoc Test::More ) for help writing this test script. use strict; #use warnings; use Carp qw( carp cluck croak confess ); use Data::Dumper; use POSIX ':signal_h' ; use Sys::SigAction qw( set_sig_handler sig_name sig_number ); my $hup = 0; my $int = 0; my $usr = 0; my $test = 1; sub sigHUP { ok( (++$test == 2) ,'sigHUP called' ); kill INT => $$; kill USR1 => $$; $hup++; sleep 1; ok( (++$test==3) ,'sig mask delayed INT and USR1' ); } sub sigINT { ok( (++$test==4) ,'sigINT called' ); $int++; sleep 2; ok( (++$test==5) ,'sig mask delayed USR1' ); } sub sigUSR { ok( (++$test==6) ,'sigUSR called' ); $usr++; } sub sigHUP_2 { ok( (++$test == 7) ,'sigHUP_2 called' ); kill INT => $$; sleep 1; ok( (++$test==9) ,'no mask/safe=0 INT_2 called before exit of HUP_2' ); } sub sigINT_2 { ok( (++$test==8) ,'sigINT_2 called' ); } SKIP: { plan skip_all => "requires perl 5.8.2 or later" if ( $] < 5.008002 ); plan tests => $tests; set_sig_handler( 'HUP' ,\&sigHUP ,{ mask=>[ qw( INT USR1 ) ] ,safe=>1 } ); set_sig_handler( 'INT' ,\&sigINT ,{ mask=>[ qw( USR1 )] ,safe=>0 } ); set_sig_handler( 'USR1' ,\&sigUSR ,{ safe=>1 } ); kill HUP => $$; set_sig_handler( 'INT' ,\&sigINT_2 ,{ mask=>[ qw( USR1 )] ,safe=>0 } ); set_sig_handler( 'HUP' ,\&sigHUP_2 ,{ mask=>[ qw( )] ,safe=>0 } ); kill HUP => $$; } #ok( $int ,'sigINT called' ); #ok( $usr ,"sigUSR called $usr" ); exit;