xref: /PHP-7.1/ext/pcntl/tests/bug47566.phpt (revision bfad6f6c)
1--TEST--
2Bug #47566 (return value of pcntl_wexitstatus())
3--SKIPIF--
4<?php if (!extension_loaded("pcntl")) print "skip"; ?>
5--FILE--
6<?php
7$pid = pcntl_fork();
8if ($pid == -1) {
9 echo "Unable to fork";
10 exit;
11} elseif ($pid) {
12 $epid = pcntl_waitpid(-1,$status);
13 var_dump(pcntl_wexitstatus($status));
14} else {
15 exit(128);
16}
17?>
18--EXPECT--
19int(128)
20