summaryrefslogtreecommitdiff
path: root/ext/pcntl/tests/pcntl_get_last_error.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcntl/tests/pcntl_get_last_error.phpt')
-rw-r--r--ext/pcntl/tests/pcntl_get_last_error.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/pcntl/tests/pcntl_get_last_error.phpt b/ext/pcntl/tests/pcntl_get_last_error.phpt
new file mode 100644
index 0000000..4ed66c9
--- /dev/null
+++ b/ext/pcntl/tests/pcntl_get_last_error.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Test pcntl_get_last_error()
+--SKIPIF--
+<?php
+ if (!extension_loaded("pcntl")) print "skip";
+?>
+--FILE--
+<?php
+var_dump(pcntl_get_last_error());
+$pid = pcntl_wait($status);
+var_dump($pid);
+var_dump(pcntl_get_last_error() == PCNTL_ECHILD);
+?>
+--EXPECT--
+int(0)
+int(-1)
+bool(true)