1

This is what which is happening

[4]+  Stopped                 sudo nohup exec php socket_axd.php
adnan@vm085:~/server/axdchat/Server$ sudo nohup exec php socket_axd.php &
[5] 2312
adnan@vm085:~/server/axdchat/Server$ sudo nohup exec php axd.com.php  &
[6] 2321

[5]+  Stopped                 sudo nohup exec php socket_axd.php
adnan@vm085:~/server/axdchat/Server$ 

I want to run multiple files in background.

1

When a background job re-appears with a messge like [5]+ Stopped, it means it was stopped because it is trying to read from the terminal.

Usually gnu nohup redirects stdin to /dev/null, but perhaps your version does not. Try adding </dev/null to your commands, or look at the setsid command (to change session) if you have it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.