
dkhanna01
Novice
Sep 11, 2009, 1:15 PM
Post #1 of 1
(35030 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 ???
|