Bug #14997: Multiple system calls cause inifinite process forking

From: Date: Fri, 11 Jan 2002 15:42:51 +0000
Subject: Bug #14997: Multiple system calls cause inifinite process forking
Groups: php.dev 
Request: Send a blank email to php-dev+get-76663@lists.php.net to get a copy of this message
From:             marcus@names.co.uk
Operating system: Linux
PHP version:      4.1.1
PHP Bug Type:     Program Execution
Bug description:  Multiple system calls cause inifinite process forking

If PHP is running via a web server, and mutiple system 
calls are made within the script to another script, 
hundreds of processes are created. Here is an example:

Script 1:
<?php
for ($i=1; $i<=5; $i++) {
    system("php script2.php");
}
?>

Script 2:
<?php
exit;
?>

The effect is the same (and more difficult to stop) when 
the system calls are made in the background. e.g.

system("php script2.php >>/dev/null 2>>/dev/null &");

I have even tried calling a shell script, which in turn 
calls the second PHP script (both in the background), but 
it still causes lots of processes.

The "exec" command is also affected.

At first, I thought this was a problem with either Zeus web 
server of Fast CGI, but I have since tried it with Apache 
and normal CGI with the same effect.

-- 
Edit bug report at: http://bugs.php.net/?id=14997&edit=1



Thread (4 messages)

« previous php.dev (#76663) next »