Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I really was unsure how to phrase the question title. What I mean is that when I use the terminal to start a program, most of the time when the terminal is closed it also exits the programs started from it.

Now this makes sense if we look at it from a hierarchical standpoint of the terminal being the parent process which spawns child processes, and any halt of the parent causes subsequent halting of the children as well.

However, I've noticed this to not always be the case. For example, I downloaded Sublime Text Editor and created a symlink in PATH. I can start this program by issuing a sublime command from the terminal, but subsequent closure of the terminal program does nothing to sublime.

However, other times either the child process that was started it also closed or it hangs up and causes problems.

tl;dr: Is it always the case that programs started from a closed parent process will be closed when the parent is exited? And if so, is there way to start a program from the terminal and then close the terminal without exiting the started process?

The whole point here is to start programs from the terminal so I do not overly-populate my desktop with symlinks.

share|improve this question
    
You can also install a "run" dialog, like gmrunrc, and not deal with terminals at all. –  T.C. Jun 9 at 0:49

1 Answer 1

You can disown a process using the name.

$ nedit &
$ disown nedit
$ exit

and nedit will still exist.

Some programs fork themselves so the program you started started ANOTHER program that runs on its own.

share|improve this answer
1  
See (unix.stackexchange.com/questions/3886/…) for clarification of disown. For manual pages, note that disown (and &) are bash internals, while nohup is an external command. –  AFH Jun 8 at 22:35

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.