|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-05-19 14:44 UTC] ewilde at bsmdevelopment dot com
Description: ------------ Scripts executed under the CLI never end. For example, the following test script will run as long as you let it, until it is killed. It doesn't appear to be looping, as it consumes no resources. Rather, it appears to be blocked waiting for some signal that never happens. Note that this may explain why the 5.4.3 build cannot be built with "--enable-phar" and why "make install" hangs forever at the end. Build parms: ./configure --with-apxs2=/usr/share/httpd-2.4/bin/apxs --with-curl --with-gd --with-ldap --with-libxml-dir=/usr/local --with-mcrypt --with-mysql=/usr/local/mysql --with-mysqli=/usr/bin/mysql_config --with-openssl --with-pspell --with-unixODBC=/usr/local/unixODBC --enable-bcmath --disable-phar --enable-sockets Test script: --------------- #!/usr/bin/php <script language="php"> fwrite(STDOUT, "This is a test\n"); </script> Expected result: ---------------- The CLI program exits. Actual result: -------------- The CLI program never exits. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 09:00:01 2025 UTC |
I tried both exit and die. When I added "exit(1)" to the test program, it still hung. When I added "die("The end")" to the test program, I saw the string "The end" but then the program hung after that. It seems that the hang is in the program exit/cleanup code of PHP, not the logic of the program itself. Any other ideas about what you'd like to test?