|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16032 program spawned by backticks or shell_exec does not die when user cancels page
Submitted: 2002-03-13 01:04 UTC Modified: 2003-02-25 02:02 UTC
From: reed at zerohour dot net Assigned:
Status: Not a bug Package: Program Execution
PHP Version: 4.1.2 OS: Debian GNU/Linux (kernel 2.2.16)
Private report: No CVE-ID: None
 [2002-03-13 01:04 UTC] reed at zerohour dot net
A process spawned by backticks (backquotes) or with shell_exec() hang around indefinitely if I cancel the page while it's running. The program I'm running is a Perl script...
	$list = `mp-list 2>&1`;
	$list2 = shell_exec("mp-list 2>&1");
	$status = shell_exec("mp-add $file 2>&1");
(it's taking too long because of a bug in our networking code -- maybe this is why its not dying?)

When I do a ps ax (several minutes later) I get a whole bunch of stuff like:

27030 ?        S      0:00 /usr/sbin/apache
27031 ?        S      0:00 sh -c mp-list 2>&1
27032 ?        R      0:23 /usr/bin/perl /usr/local/bin/mp-list

Happens when I 'cancel' in MS IE 5 and in OmniWeb (Macintosh browsers).




Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-26 14:13 UTC]
Dup of #15642
 [2003-02-25 02:02 UTC]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

see bug #15642

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Nov 24 04:01:23 2020 UTC