summaryrefslogtreecommitdiff
path: root/ext/pcntl/tests/bug47566.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcntl/tests/bug47566.phpt')
-rw-r--r--ext/pcntl/tests/bug47566.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/pcntl/tests/bug47566.phpt b/ext/pcntl/tests/bug47566.phpt
new file mode 100644
index 0000000..6eb3dbc
--- /dev/null
+++ b/ext/pcntl/tests/bug47566.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #47566 (return value of pcntl_wexitstatus())
+--SKIPIF--
+<?php if (!extension_loaded("pcntl")) print "skip"; ?>
+--FILE--
+<?php
+$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)