php-src/ext/pcntl/tests/bug47566.phpt
Arnaud Le Blanc 8620c10b3e Fix return value of pcntl_wextistatus() (fixes #47566,
patch by james at jamesreno dot com)
2009-05-26 14:00:42 +00:00

20 lines
345 B
PHP

--TEST--
Bug #47566 (return value of pcntl_wexitstatus())
--SKIPIF--
<?php if (!extension_loaded("pcntl")) print "skip"; ?>
--FILE--
<?
$pid = pcntl_fork();
if ($pid == -1) {
echo "Unable to fork";
exit;
} elseif ($pid) {
$epid = pcntl_waitpid(-1,$status);
var_dump(pcntl_wexitstatus($status));
} else {
exit(128);
}
?>
--EXPECT--
int(128)