CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Other Programming Languages: PHP:
Background process in PHP

 



dkhanna01
Novice

Sep 11, 2009, 1:15 PM

Post #1 of 1 (21079 views)
Background process in PHP Can't Post

I have a PHP code snippet which reads as:

$cmd = "cd ~/stpbuild && build.sh dev:package < $my_file";
$cmd = $cmd.' & echo $!';

exec($cmd,$op);

Now the first line is running the 2 shell command which I need to execute in this manner only (using 2 &&s).

Now when I'm executing it via "exec" the command is executing successfully but in background which it should as I'm trying to run this process in background in second line "& echo $!"

Any idea why this command does not going in to background ???

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives