php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33942 the patch to #33156 crash cygwin except cli
Submitted: 2005-08-01 06:47 UTC Modified: 2005-08-02 19:52 UTC
From: xuefer at 21cn dot com Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2005-08-01 (dev) OS: cygwin only
Private report: No CVE-ID: None
 [2005-08-01 06:47 UTC] xuefer at 21cn dot com
Description:
------------
in reply to: http://bugs.php.net/bug.php?id=33156 (can't open the bug)

for CYGWIN
in zend_set_timeout()
ITIMER_REAL is set
in zend_unset_timeout()
ITIMER_REAL is NOT unset, but unset ITIMER_PROF instead

it has no problem with "make test" as the test won't last long. but with any SAPI other than cli. ITIMER_REAL is triggered after php request is shutdown, result a crash

Reproduce code:
---------------
set timeout to 5
./sapi/php -b 1026
request it with an empty php script
wait for 5 second countdown
crash


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-01 12:07 UTC] sniper@php.net
Dmitry, check your patch please. :)

 [2005-08-01 23:25 UTC] nlopess@php.net
I've tested the CLI and CGI sapis and eveything works fine. I couldn't test further, because you didn't specify the sapi you were using.
Anyway, you are right and I missed the zend_unset_timeout() in my patch.

Here is a patch that should fix your problem: http://mega.ist.utl.pt/~ncpl/patch_cygwin_php.txt
Please test it.


Thanks,
Nuno
 [2005-08-02 03:06 UTC] xuefer at 21cn dot com
fastcgi, and maybe other sapi except cli/CGI!, as both cli/cgi exit immediately after request shutdown

the patch nlopess posted should work (i did it after my report too)

but btw, the indention is not consistent with previous patch
 [2005-08-02 15:10 UTC] nlopess@php.net
I've tested fastcgi and it seems to work fine.
I've also fixed the indentation in the patch.
 [2005-08-02 19:02 UTC] dmitry@php.net
Nuno's patch is applied to CVS HEAD and PHP_5_0.
 [2005-08-02 19:24 UTC] nlopess@php.net
the patch should also be applied to the 4_4 branch.
 [2005-08-02 19:52 UTC] sniper@php.net
Done.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 10:01:30 2024 UTC