Bash:
$nohup sleep 10 &
but when I close the terminal:

Any ideas? ideally I want to run Mongodb in the background.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Interesting. Seems like an issue specific to the default Terminal app. Because for what it’s worth, iTerm2 doesn’t exhibit this behavior. (so in other words,
nohupis not actually broken on OS X; this just seems like special behavior in Terminal which looks for subprocesses on exit.)In many ways, iTerm2 it’s better than the default terminal. You should give it a try!