pourquoi n'utilises tu pas nohup ?


nohup commande&
echo $? > /var/run/commande.pid
kill `cat /var/run/commande.pid`


et le tour est joué ;)