RE: [PHP-DEV] How to star program backgrund?
| From: | Manuel Lemos | Date: | Mon, 10 Jul 2000 06:41:20 +0000 |
| Subject: | RE: [PHP-DEV] How to star program backgrund? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-24001@lists.php.net to get a copy of this message | ||
Hello Theodore,
On 28-Jun-00 15:43:49, you wrote:
>I'm not sure your setup, but on most of ours, you can't run updatedb as the
>werb server user, updatedb usually needs to be run as root....
>I'm not sure if you can run a program in the background either, anyone else
>want to comment?
I've just added finally a note to the PHP manual on how to let programs be
started and left running in the background. Basically all you need is to
redirect the program output to a file or some other output stream
(/dev/null). Wait for the next manual rebuild.
>$RunCommand = exec("updatedb&");
Make it like this:
>$RunCommand = exec("updatedb >/dev/null &");
Regards,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--