#47816 [Opn->Csd]: pcntl tests failing on NetBSD

[email protected]
Newsgroups php.bugs
Message-ID <[email protected]>
 ID:               47816
 Updated by:       [email protected]
 Reported By:      [email protected]
-Status:           Open
+Status:           Closed
 Bug Type:         PCNTL related
 Operating System: NetBSD 4
 PHP Version:      5.3CVS-2009-03-28 (CVS)
-Assigned To:      
+Assigned To:      mbeccati
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2009-03-28 03:08:46] [email protected]

Hi, 

This looks good, please commit :)

Thanks for your tests on NetBSD.


------------------------------------------------------------------------

[2009-03-28 01:43:19] [email protected]

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
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.