From: carb at videotron dot ca
Operating system: RedHat 9.0
PHP version: 4.3.2
PHP Bug Type: Apache related
Bug description: Process started with "exec cmd > /dev/null &" dies when httpd is
closed
Description:
------------
When forking off a process from PHP with the statement exec("command >
/dev/null &"), the process will get killed when the httpd is closed.
Note: This occurs even though ps is telling me that the parent process id
is init (parent process id 1).
Reproduce code:
---------------
<?PHP
session_write_close();
//Simple example to reproduce problematic forking.
exec("ping localhost > /dev/null &");
?>
Expected result:
----------------
A continuous ping process should be running in the backgroud,
independently of httpd. When httpd is closed, the ping (or whatever
relevant) process should keep running.
Actual result:
--------------
When httpd is closed, the ping (or whatever relevant) process dies.
--
Edit bug report at http://bugs.php.net/?id=24616&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24616&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24616&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=24616&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24616&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24616&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24616&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24616&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24616&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24616&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24616&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24616&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24616&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24616&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24616&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24616&r=gnused