Re: PHP 4.0 Bug #7607: system()ed commands do not exit if the user interrupts transfer

From: Date: Fri, 03 Nov 2000 04:19:21 +0000
Subject: Re: PHP 4.0 Bug #7607: system()ed commands do not exit if the user interrupts transfer
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-36904@lists.php.net to get a copy of this message
On 3 Nov 2000 doktor1@earthlink.net wrote: > From: doktor1@earthlink.net > Operating system: SunOS 5.8 Generic sun4u sparc SUNW,Ultra-2 > PHP version: 4.0.3 > PHP Bug Type: POSIX related > Bug description: system()ed commands do not exit if the user interrupts transfer > > If I system("/path/to/ping somehost") and then hit Stop or close the browser or go to > a different page, the ping process will still be in the process table, and show as being owned > (PPID) by httpd. I don't know whether this is an issue with php or with Apache. > system() uses popen() in its underlying implementation. Apparently PHP doesn't keep track of what it keeps open and kill them afterward. Try using ping -c to limit the number of ping tests or use sockets to do it low level within PHP itself. -- Ignacio Vazquez-Abrams <ignacio@openservices.net>

« previous php.dev (#36904) next »