cvs: php4 /ext/pcntl/tests 001.phpt

From: Date: Fri, 06 Jul 2001 18:30:41 +0000
Subject: cvs: php4 /ext/pcntl/tests 001.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6115@lists.php.net to get a copy of this message
jason Fri Jul 6 14:30:41 2001 EDT Modified files: /php4/ext/pcntl/tests 001.phpt Log: Signal numbers are not uniform accross all platforms. Modified test to use the constants unless a failure occurs. Index: php4/ext/pcntl/tests/001.phpt diff -u php4/ext/pcntl/tests/001.phpt:1.2 php4/ext/pcntl/tests/001.phpt:1.3 --- php4/ext/pcntl/tests/001.phpt:1.2 Fri Jul 6 01:48:52 2001 +++ php4/ext/pcntl/tests/001.phpt Fri Jul 6 14:30:38 2001 @@ -32,7 +32,12 @@ $options=0; posix_kill($pid, SIGTERM); pcntl_waitpid($pid, &$status, $options); - if ( pcntl_wifsignaled($status) ) print "\nProcess was terminated by signal : ". pcntl_wtermsig($status); + if ( pcntl_wifsignaled($status) ) { + $signal_print=pcntl_wtermsig($status); + if ($signal_print==SIGTERM) $signal_print="SIGTERM"; + print "\nProcess was terminated by signal : ". $signal_print; + } + } } @@ -49,7 +54,11 @@ $options=WUNTRACED; posix_kill($pid, SIGSTOP); pcntl_waitpid($pid, &$status, $options); - if ( pcntl_wifstopped($status) ) print "\nProcess was stoped by signal : ". pcntl_wstopsig($status); + if ( pcntl_wifstopped($status) ) { + $signal_print=pcntl_wstopsig($status); + if ($signal_print==SIGSTOP) $signal_print="SIGSTOP"; + print "\nProcess was stoped by signal : ". $signal_print; + } posix_kill($pid, SIGCONT); } } @@ -66,7 +75,7 @@ Exited With: -1 Testing pcntl_wifsignaled.... -Process was terminated by signal : 15 +Process was terminated by signal : SIGTERM Testing pcntl_wifstopped and pcntl_wstopsig.... -Process was stoped by signal : 19 +Process was stoped by signal : SIGSTOP

« previous php.cvs (#6115) next »