Run program asynchronously
Posted: Tue Dec 15, 2009 5:43 am
Hi,
Sorry for my English
Since yesterday I have got problem with asynchronously running programs under Linux. Problems started when I tried to run command with && operator (without it everything is ok). Problem example:
Problem is that command is running synchronously. Can anyone help me with it? What is wrong with it?
Sorry for my English
Code: Select all
$out = -1;
$cmd = 'sleep 10 && echo "ok" 2>&1 &';
system($cmd, $out);