note 85080 added to function.exec
| From: | YoussefOmar at osu1 dot php dot net | Date: | Wed, 13 Aug 2008 23:53:10 +0000 |
| Subject: | note 85080 added to function.exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-143464@lists.php.net to get a copy of this message | ||
The above note that says:
Note: If a program is started with this function, in order for it to continue running in the
background, the output of the program must be redirected to a file or another output stream. Failing
to do so will cause PHP to hang until the execution of the program ends.
This Note is missing an important part of it, if you do the redirect only as
<?php
exec("/php/bin/php file.php >/dev/null");
?>
php still hangs till the execution of that file is done.
to make it work as a background process, you need to add &
<?php
exec("/php/bin/php file.php >/dev/null &");
?>
----
Server IP: 64.71.164.2
Probable Submitter: 63.249.96.242
----
Manual Page -- http://www.php.net/manual/en/function.exec.php
Edit -- https://master.php.net/note/edit/85080
Del: integrated -- https://master.php.net/note/delete/85080/integrated
Del: useless -- https://master.php.net/note/delete/85080/useless
Del: bad code -- https://master.php.net/note/delete/85080/bad+code
Del: spam -- https://master.php.net/note/delete/85080/spam
Del: non-english -- https://master.php.net/note/delete/85080/non-english
Del: in docs -- https://master.php.net/note/delete/85080/in+docs
Del: other reasons-- https://master.php.net/note/delete/85080
Reject -- https://master.php.net/note/reject/85080
Search -- https://master.php.net/manage/user-notes.php