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.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Volatil3
  • 123
  • 5
  • 1
    Is this what you mean? http://unix.stackexchange.com/questions/47230/how-to-execute-multiple-command-using-nohup – Vombat May 13 '16 at 10:31
  • @coffeMug something like that but I do i change it to run for PHP based files? – Volatil3 May 13 '16 at 11:15

1 Answers1

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.

meuh
  • 49,672
  • 2
  • 52
  • 114