8

Possible Duplicate:
How do I detach a process from Terminal, entirely?

I've a program running in a Unix console on a remote Unix computer. I (stupidly) didn't run it using nohup &, and now I need to close the local console.

Is there any way to have it keep running remotely after closing the local console?

Thrawn
  • 335

4 Answers4

11

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.

5

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.

alanc
  • 1,084
coneslayer
  • 8,981
2

Ctrl-Z to suspend the process, then bg to cause the program to go into the background and keep running until it completes.

2

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.

geek
  • 10,674