1

In both scenarios:

  1. SSH access

  2. Direct access

6

Background processes will be killed.

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

  • +1 for screen. Once you start using it you will wonder how you ever coped without it. – ThatGraemeGuy Jul 20 '09 at 14:51
  • 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 '09 at 15:42
  • +1 for screen though. – robcast Jul 23 '09 at 15:43
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.

  • Very helpful – Jader Dias Jul 20 '09 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.

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.