patch by james at jamesreno dot com)
literal). (Ilia)
- Fixed bug #47616 (curl keeps crashing). (Felipe)
- Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware). (Ilia)
+- Fixed bug #47566 (pcntl_wexitstatus() returns signed status).
+ (patch by james at jamesreno dot com)
- Fixed bug #47564 (unpacking unsigned long 32bit bit endian returns wrong
result). (Ilia)
- Fixed bug #47487 (performance degraded when reading large chunks after fix of
status_word = (int) Z_LVAL_PP(status);
- /* WEXITSTATUS only returns 8 bits so we *MUST* cast this to signed char
- if you want to have valid negative exit codes */
- RETURN_LONG((signed char) WEXITSTATUS(status_word));
+ RETURN_LONG(WEXITSTATUS(status_word));
#else
RETURN_FALSE;
#endif
Staring wait.h tests....
Testing pcntl_wifexited and wexitstatus....
-Exited With: -1
+Exited With: 255
Testing pcntl_wifsignaled....
Process was terminated by signal : SIGTERM
--- /dev/null
+--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)