From: Matteo Beccati Date: Sat, 28 Mar 2009 03:17:31 +0000 (+0000) Subject: - Fixed bug #47816 (pcntl tests failing on NetBSD) X-Git-Tag: php-5.4.0alpha1~191^2~4030 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6bf4c001427c3ed193f059a35274f14963126bca;p=php - Fixed bug #47816 (pcntl tests failing on NetBSD) # Tests will still fail until a few kernel bugs are fixed --- diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 414446a049..58d05502fc 100755 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -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);