From 0a0c8bbbcdcce8ba0f502dc58d58b409c4b28607 Mon Sep 17 00:00:00 2001 From: Manuel Lemos Date: Mon, 10 Jul 2000 05:15:38 +0000 Subject: [PATCH] Added note on leaving programs running on the background from exec(), system() and passthru() without making PHP hang until the execution of the programs is finished. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@27978 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/exec.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/functions/exec.xml b/functions/exec.xml index 81170bb3f5..26ce54dd03 100644 --- a/functions/exec.xml +++ b/functions/exec.xml @@ -89,6 +89,13 @@ system(EscapeShellCmd($cmd)) EscapeShellCmd to make sure that users cannot trick the system into executing arbitrary commands. + + 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. + See also system, PassThru, popen, @@ -130,6 +137,13 @@ system(EscapeShellCmd($cmd)) setting the content-type to image/gif and then calling a pbmplus program to output a gif, you can create PHP scripts that output images directly. + + Note 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. + See also exec, system, popen, EscapeShellCmd, @@ -170,6 +184,13 @@ system(EscapeShellCmd($cmd)) users cannot trick the system into executing arbitrary commands. + + 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. + The System call also tries to automatically flush the web server's output buffer after each line of output if