Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

In both scenarios:

  1. SSH access

  2. Direct access

share|improve this question

4 Answers 4

up vote 6 down vote accepted

Background processes will be killed.

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

share|improve this answer
    
+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

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.

share|improve this answer
    
Very helpful –  Jader Dias Jul 20 '09 at 14:45

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/

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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