Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199901

Re: [PHP3] Shell in background? From: Karl Pielorz (kpielorz <email protected>)
Date: 01/31/99

Jeremiah Bellomy wrote:

> I've found that something like the following usually works great:
>
> exec( "/usr/local/bin/reconf system.dat > /dev/null &" );

Hmmm... That doesn't work for me... The calling script patiently waits for the
called process to finish... Even if I completely wrapper it, e.g.

In the script do:

exec( "/usr/local/bin/reconf-wrapper" );

And 'reconf-wrapper' is:

"
#!/bin/sh

/usr/local/bin/reconf system.dat >/dev/null 2>&1 &
exit
"

Again, the polite PHP script waits until the processes spawned by the wrapper
has finished... If I run the wrapper from the shell it launches the process in
background, and returns immediatly... If I do it from PHP it launches the
process in background, then hangs around waiting for it to finish... :(

I can see probably why it behaves like this, I just don't want it to! <G>

-Kp

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>