2

In both scenarios:

  1. SSH access

  2. Direct access

4 Answers 4

6

Background processes will be killed.

You have to use "nohup" or "screen" to keep them alive.

1
  • 1
    I think it is not correct that background processes will be killed. Try "sleep 1000 &", close the terminal and look in the process list.
    – robcast
    Jul 23, 2009 at 15:42
4

If you're using bash, you also have access to the 'disown' built-in which dissasociates all backgrounded jobs from the current session. That will let you quit your current session and have them continue on. You won't be able to foreground those jobs in another shell so if that's your aim you'll need to look at screen.

The disown command is useful however if you started the job in the background and don't want to have it exit when you log out or close your terminal.

1
  • Very helpful
    – Jader Dias
    Jul 20, 2009 at 14:45
0

I'm not sure what exactly you're trying to accomplish, but have you tried running the "Screen" command?

http://www.rackaid.com/resources/linux-tutorials/general-tutorials/using-screen/

0

You really should be using "screen" as already proposed.

But technically a process will continue running if you backgrounded it with "&" and it does not do any input or output to the no-longer-existing terminal.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .