Sep 11, 2009, 1:15 PM
Post #1 of 1
I have a PHP code snippet which reads as:
Background process in PHP
$cmd = "cd ~/stpbuild && build.sh dev:package < $my_file";
$cmd = $cmd.' & echo $!';
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 ???