diff options
author | Matteo Beccati <mbeccati@php.net> | 2009-03-28 03:21:04 +0000 |
---|---|---|
committer | Matteo Beccati <mbeccati@php.net> | 2009-03-28 03:21:04 +0000 |
commit | da141679cb38ef2d4bfb618bf4462b8205f4997f (patch) | |
tree | 968c76a3d291fe13b54a05a8fb7473a3fcfeb856 /ext/pcntl | |
parent | 89741745326a873e2057240735b56f2496f94d65 (diff) | |
download | php-git-da141679cb38ef2d4bfb618bf4462b8205f4997f.tar.gz |
MFH:
- Fixed bug #47816 (pcntl tests failing on NetBSD)
# Tests will still fail until a few kernel bugs are fixed
Diffstat (limited to 'ext/pcntl')
-rwxr-xr-x | ext/pcntl/pcntl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 91fcea3738..e5ce729b37 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); |