ID: 38273 User updated by: axelluttgens at swing dot be Reported By: axelluttgens at swing dot be Status: Wont fix Bug Type: PCNTL related Operating System: Mac OSX 10.4.7 PHP Version: 5.2.4 New Comment:
Hello Jani, Thanks for your follow-up. But I don't understand the relationship with ticks. Could you explain? TIA, Axel Previous Comments: ------------------------------------------------------------------------ [2008-07-18 16:16:09] [EMAIL PROTECTED] Ticks are deprecated in PHP 5.3.0 and will be completely removed in PHP 6. We're not going to waste time trying to fix the inherently broken thing. ------------------------------------------------------------------------ [2007-07-14 11:03:56] axelluttgens at swing dot be So, as announced, I've compiled the php5.2-200707130630 snapshot. Here follows the output of a "php -i" command: PHP Version => 5.2.4-dev System => Darwin ALMbp.local 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 Build Date => Jul 13 2007 10:13:10 Configure Command => './configure' '--prefix=/usr/local/php5' '--with-zlib-dir=/usr' '--with-zlib' '--enable-zip' '--enable-mbstring' '--enable-exif' '--enable-sockets' '--enable-ftp' '--enable-pcntl' '--with-iodbc=/usr' '--with-curl=/usr' '--with-curlwrappers' '--with-ldap=/usr' '--with-kerberos=/usr' '--with-apxs=/usr/sbin/apxs Server API => Command Line Interface Virtual Directory Support => disabled Configuration File (php.ini) Path => /usr/local/php5/lib Loaded Configuration File => (none) PHP API => 20041225 PHP Extension => 20060613 Zend Extension => 220060519 Debug Build => no Thread Safety => disabled Zend Memory Manager => enabled IPv6 Support => enabled Registered PHP Streams => zip, php, file, data, ftp, gopher, telnet, dict, ldap, http, https, ftps, compress.zlib Registered Stream Socket Transports => tcp, udp, unix, udg Registered Stream Filters => string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, zlib.* This program makes use of the Zend Scripting Language Engine: Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies Of course, things have changed since July 2006, as I am now on an Intel Mac, with OS X 10.4.10. Anyway, I doubt to be able to exacly reproduce the former environement; but, if needed, I could perhaps try the same on a 10.4.10 PPC. So, I first tried the original reproduce code, the one dated 2006-07-31 with the "if" statement. It seems that I still get the unexpected behavior when the dummy statement ($err = $err;) is commented out: $ ./sigtest.php ^C Warning: socket_select(): unable to select [4]: Interrupted system call in /Volumes/ALMbpData/sigtest.php on line 32 Received SIGINT ^C Warning: socket_select(): unable to select [4]: Interrupted system call in /Volumes/ALMbpData/sigtest.php on line 32 Handling SIGINT Received SIGINT ^C Warning: socket_select(): unable to select [4]: Interrupted system call in /Volumes/ALMbpData/sigtest.php on line 32 Handling SIGINT Received SIGINT [and so on...] and that uncommenting the dummy statement still brings the expected behavior back: $ ./sigtest.php ^C Warning: socket_select(): unable to select [4]: Interrupted system call in /Volumes/ALMbpData/sigtest.php on line 32 Received SIGINT Handling SIGINT ^C Warning: socket_select(): unable to select [4]: Interrupted system call in /Volumes/ALMbpData/sigtest.php on line 32 Received SIGINT Handling SIGINT [and so on...] In a word, it looks like the same behavior has been carried over from php 4 to php 5. On the other hand, re-reading my variant dated 2006-08-02, the one with the "switch" statement instead of the "if" statement, I believe I just introduced noise (sorry for that...). Indeed, one may notice that I introduced a statement between the "case SOCKET_EINTR:" and the PollSigs() call. Removing that extraneous statement, the socket_clear_error() call, I just get the same unexpected behavior as with he original reproduce code. In a sense, this is good news, as the basic features of the language thus behave similary! HTH, Axel ------------------------------------------------------------------------ [2007-07-13 07:56:57] axelluttgens at swing dot be Hello Jani, I'll try to test the case with the php5.2-200707130630 snapshot during this week-end. Thanks for the follow-up, Axel ------------------------------------------------------------------------ [2007-07-11 13:05:39] [EMAIL PROTECTED] Please try the 5.2 snapshot as requested before. We are going to discontinue support for PHP 4 this year so it is very unlikely that this bug will ever get fixed in PHP 4. But if the bug does not exist in PHP 5.2 it's possible to backport the fix from it to PHP 4. ------------------------------------------------------------------------ [2006-08-02 11:05:58] axelluttgens at swing dot be As a follow-up: a "switch" statement, instead of reproduce code's "if" statement, does not seem to be affected by the problem. So, replacing the while loop in reproduce code with this one: while (!socket_select($r = array($endpoint), $w = NULL, $e = NULL, NULL)) switch ($err = socket_last_error()) { case SOCKET_EINTR: socket_clear_error(); PollSigs(); break; default: echo "socket_select() failed with $err\n"; break 2; } I get the expected behavior back (without having to resort to the "dummy statement" kludge): $ /Volumes/Data/Sources/sigtest.php ^C Warning: socket_select() unable to select [4]: Interrupted system call in /Volumes/Data/Sources/sigtest.php on line 32 Received SIGINT Handling SIGINT ^C Warning: socket_select() unable to select [4]: Interrupted system call in /Volumes/Data/Sources/sigtest.php on line 32 Received SIGINT Handling SIGINT Could this be of some help for narrowing the cause? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/38273 -- Edit this bug report at http://bugs.php.net/?id=38273&edit=1