]> granicus.if.org Git - php/commitdiff
MFH:
authorMatteo Beccati <mbeccati@php.net>
Sat, 28 Mar 2009 03:21:04 +0000 (03:21 +0000)
committerMatteo Beccati <mbeccati@php.net>
Sat, 28 Mar 2009 03:21:04 +0000 (03:21 +0000)
- Fixed bug #47816 (pcntl tests failing on NetBSD)
# Tests will still fail until a few kernel bugs are fixed

NEWS
ext/pcntl/pcntl.c

diff --git a/NEWS b/NEWS
index 11e221d766493eba305ef49aa194801986253568..e6dccac869fa7d06b821c58247120d3b104fbe6e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ PHP                                                                        NEWS
 ?? ??? 200?, PHP 5.3.0 RC 2
 - Undeprecated ticks. (Arnaud)
 
+- Fixed bug #47816 (pcntl tests failing on NetBSD). (Matteo)
 - Fixed bug #44861 (scrollable cursor don't work with pgsql). (Matteo)
 - Fixed bug #47779 (Wrong value for SIG_UNBLOCK and SIG_SETMASK constants).
   (Matteo)
index 91fcea3738033133b01cb94612cd6d528d87b02c..e5ce729b37fb24421051f01fe782493c413b020b 100755 (executable)
@@ -924,6 +924,14 @@ static void pcntl_sigwaitinfo(INTERNAL_FUNCTION_PARAMETERS, int timedwait) /* {{
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
        }
 
+       /*
+        * sigtimedwait and sigwaitinfo can return 0 on success on some 
+        * platforms, e.g. NetBSD
+        */
+       if (!signo && siginfo.si_signo) {
+               signo = siginfo.si_signo;
+       }
+
        if (signo > 0 && user_siginfo) {
                if (Z_TYPE_P(user_siginfo) != IS_ARRAY) {
                        zval_dtor(user_siginfo);