Keep a program running after closing a console, after the program has started [duplicate]
If your shell is bash
, they you can use disown
. Ctrl-Z to suspend the process, then disown -h
to make it not receive SIGHUP.
On Solaris 9, you can use nohup -p <pid>
to nohup a running process. Here's an interesting explanation of the implementation. I don't know if this has been implemented on any other Unices.
Ctrl-Z to suspend the process, then bg
to cause the program to go into the background and keep running until it completes.
If you can afford to stop the program and restart it before logging out, then stop it and restart it through screen, which is a must for anybody using remote connections to unix hosts.