ID: 38273
User updated by: axelluttgens at swing dot be
Reported By: axelluttgens at swing dot be
Status: Bogus
Bug Type: PCNTL related
Operating System: Mac OSX 10.4.7
PHP Version: 5.2.4
New Comment:
Yes, of course. :-)
Thanks a lot,
Axel
Previous Comments:
------------------------------------------------------------------------
[2009-03-19 13:26:54] lbarnaud@php.net
Looking at this code, we can see that between socket_select() call and
HandleInt() call, the code have no "tickable" statements.
So the first time the tick functions (signal handlers) are called after
socket_select() is before returning from PollSigs().
This is why the output differs in the first interrupt. This also
explains why the two variants (the one with a dummy statement before
calling PollSigs() and the one with switch) have a different behavior.
(this is at most counter-intuitive, but not a bug)
------------------------------------------------------------------------
[2008-07-19 22:25:58] axelluttgens at swing dot be
Hello Jani,
Thanks for your follow-up.
But I don't understand the relationship with ticks. Could you explain?
TIA,
Axel
------------------------------------------------------------------------
[2008-07-18 16:16:09] jani@php.net
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
------------------------------------------------------------------------
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