[poe-commits] poe/tests/90_regression merijn-sigchld-system.t,NONE,1.1
Brought to you by:
rcaputo
From: <ha...@us...> - 2005-10-14 15:21:27
|
Update of /cvsroot/poe/poe/tests/90_regression In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26800/tests/90_regression Added Files: merijn-sigchld-system.t Log Message: SIGCHLD bug reported by Merijn Broeren on October 13 2005 on the mailing list. This test evokes the proper results for me (failure on new POE, success on old POE) on Linux 2.6, should be portable but I'm not positive. --- NEW FILE: merijn-sigchld-system.t --- #!/usr/bin/perl -w # $Id: merijn-sigchld-system.t,v 1.1 2005/10/14 15:21:16 hachi Exp $ # vim: filetype=perl # System shouldn't fail in this case. use strict; sub POE::Kernel::TRACE_DEFAULT () { 1 } sub POE::Kernel::ASSERT_DEFAULT () { 1 } sub POE::Kernel::TRACE_FILENAME () { "./test-output.err" } use POE; use Test::More tests => 2; my $command = "/bin/true"; SKIP: { skip( "$command is necessary for this test", 2 ) unless -x $command; POE::Session->create( inline_states => { _start => sub { diag( "SIG{CHLD}: $SIG{CHLD}" ); is( system( $command ), 0, "System returns properly" ); $_[KERNEL]->sig( 'CHLD', 'chld' ); diag( "SIG{CHLD}: $SIG{CHLD}" ); is( system( $command ), 0, "System returns properly" ); $_[KERNEL]->sig( 'CHLD' ); }, chld => sub { diag( "Caught child" ); }, } ); } POE::Kernel->run(); |