LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Background Job stops when closing shell (https://www.linuxquestions.org/questions/linux-newbie-8/background-job-stops-when-closing-shell-626351/)

dragunu 03-07-2008 02:55 AM

Background Job stops when closing shell
 
greetings.

I am trying to force a process to run in background. I have tried the following options

1) /path/command &
2) /path/command ( press CTRL + Z , type bg )

However, the job remains assigned to the current shell ( ie, the shell which started the process ). When I close/disconnect the shell, the background process stops immediatly.

How can I prevent this please?

Reagrds,

drg

jlliagre 03-07-2008 03:26 AM

Nohup is preventing that:
Code:

nohup /path/command </dev/null >/dev/null 2>&1 &

dragunu 03-07-2008 03:40 AM

Quote:

Originally Posted by jlliagre (Post 3080871)
Nohup is preventing that:
Code:

nohup /path/command </dev/null >/dev/null 2>&1 &

thanks!

drg


All times are GMT -5. The time now is 03:05 AM.