php exécuter le script attendez la réponse

exec('sh somescript.sh');//this will wait for script to finish
exec('sh somescript.sh >/dev/null 2>&1 &'); //this will NOT wait 
Friendly Hawk