#47816 [NEW]: pcntl tests failing on NetBSD

[email protected] ("[email protected]")
Newsgroups php.bugs
Message-ID <[email protected]>
From:             [email protected]
Operating system: NetBSD 4
PHP version:      5.3CVS-2009-03-28 (CVS)
PHP Bug Type:     PCNTL related
Bug description:  pcntl tests failing on NetBSD

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 bug report at http://bugs.php.net/?id=47816&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        http://bugs.php.net/fix.php?id=47816&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        http://bugs.php.net/fix.php?id=47816&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        http://bugs.php.net/fix.php?id=47816&r=trysnapshot60
Fixed in CVS:                        http://bugs.php.net/fix.php?id=47816&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47816&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=47816&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=47816&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=47816&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=47816&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=47816&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=47816&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=47816&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=47816&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=47816&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47816&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47816&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=47816&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=47816&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=47816&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=47816&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=47816&r=mysqlcfg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.