Sample Header Ad - 728x90

Why does my process terminate upon log out despite nohup and disown?

1 vote
1 answer
2498 views
I have an executable (a server made with Unity) which I want to continue to run after I log out. All the interwebs say that I should be able to accomplish this with nohup or disown or both. But it doesn't work. I do:
nohup /usr/bin/myexecutable &
disown -h
and check the process list at this point, and my process is running. Then I exit and ssh back in, and check the process list again, and it is gone. I have tried it with and without disown, with and without the -h flag, etc., but nothing stops the process from disappearing when I exit the shell. I can do it with screen or tmux, but I'm trying to set up a simple launch script that nontechnical people on the staff can just log in and run. Any ideas? (I am running Ubuntu 16.04.6 LTS.) EDIT: Someone suggested this question , but like in the comment from @mathsyouth, disown does not work for me. @Fox, the author of the only answer to that question, says "If the program you are using still dies on shell-exit with disown, it is a different problem." So it appears this is a different problem. (And as mentioned above, his suggestion of using screen is not helpful in my use case.)
Asked by Joe Strout (131 rep)
Jul 7, 2020, 05:57 PM
Last activity: May 25, 2025, 07:02 PM