Bug #8248 Updated: system function cannot support "&"
| From: | elixer@php.net | Date: | Sat, 28 Apr 2001 13:30:45 +0000 |
| Subject: | Bug #8248 Updated: system function cannot support "&" | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52703@lists.php.net to get a copy of this message | ||
ID: 8248
Updated by: elixer
Reported By: erwinba@163.net
Old-Status: Open
Status: Closed
Bug Type: Program Execution
PHP Version: 4.0.3
Assigned To:
Comments:
This is not a bug. From the manual (http://www.php.net/manual/en/function.exec.php):
"Note also that if you start a program using this function and want to leave it running in the
background, you have to make sure that the output of that program is redirected to a file or some
other output stream or else PHP will hang until the execution of the program ends."
Try changing your code from:
system("/mycommand/myprog &");
to:
system("/mycommand/myprog > /dev/null &");
Sean
Previous Comments:
---------------------------------------------------------------------------
[2001-02-01 15:21:11] elixer@php.net
Have you tried disabling safe_mode? The command will not be stripped of "questionable"
characters if safe_mode is disabled.
Sean
---------------------------------------------------------------------------
[2000-12-14 03:50:32] erwinba@163.net
the "system", "exec" or "passthru" function cannot support
the background process, such as :
system("/mycommand/myprog &");
The functions will not continue untill "/mycommand/myprog"
is finished, but I wish the PHP can return at once to continue after the myprog is started not
ended.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8248&edit=2