#47816 [Opn]: pcntl tests failing on NetBSD
| From: | lbarnaud@php.net | Date: | Sat, 28 Mar 2009 03:08:47 +0000 |
| Subject: | #47816 [Opn]: pcntl tests failing on NetBSD | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-135241@lists.php.net to get a copy of this message | ||
ID: 47816
Updated by: lbarnaud@php.net
Reported By: mbeccati@php.net
Status: Open
Bug Type: PCNTL related
Operating System: NetBSD 4
PHP Version: 5.3CVS-2009-03-28 (CVS)
New Comment:
Hi,
This looks good, please commit :)
Thanks for your tests on NetBSD.
Previous Comments:
------------------------------------------------------------------------
[2009-03-28 01:43:19] mbeccati@php.net
Description:
------------
There are a few problems with the new pcntl extension on my NetBSD 4.0
system. The extension compiles fine, but a few tests fail.
First, it seems that NetBSD sigtimedwait / sigwaitinfo implementations
return 0 on success and -1 on failure, rather then the signal number:
see http://www.daemon-systems.org/man/sigwait.2.html
A patch is available here:
http://www.beccati.com/misc/php/pcntl_sigtimedwait_HEAD.diff
I didn't commit myself as you might want a better (autoconf based?)
fix.
Second, there are a couple of kernel bugs interfering with pcntl
properly working:
http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=41076
(Fixed in
-current)
http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=41085
(Under
investigation)
Once those bugs have been fixed the extensions should be properly
working on NetBSD.
Reproduce code:
---------------
pcntl_sigprocmask(SIG_BLOCK, array(SIGTERM));
posix_kill(posix_getpid(), SIGTERM);
var_dump(pcntl_sigwaitinfo(array(SIGTERM), $siginfo));
var_dump($siginfo);
Expected result:
----------------
int(15)
array(3) {
[u"signo"]=>
int(15)
[u"errno"]=>
int(0)
[u"code"]=>
int(0)
}
Actual result:
--------------
int(0)
NULL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47816&edit=1