Possible Duplicate:How can I close a terminal without killing the command running in it? I have a very low-end server running Debian Squeeze that I occasionally ssh to. The system tends to be slow, e.g. running apt-cache search might take half a minute. Occasionally I find that I can't wait for a process to complete (I'm on my laptop and need to go somewhere).If I had originally started the process with nohup or inside screen, this would be no problem. But how can I get an already running process to continue despite my logging off?
How can I tell a running process to disregard SIGHUP?
nohup;logout
On the assumption that you are using bash, ksh, zsh, or another similar shell, you can background the process, then run disown. Specifically, in bash you probably want disown -h.From bash's help page on disown:disown: disown [-h] [-ar] [jobspec ...]    Remove jobs from current shell.    Removes each JOBSPEC argument from the table of active jobs.  Without    any JOBSPECs, the shell uses its notion of the current job.    Options:      -a        remove all jobs if JOBSPEC is not supplied      -h        mark each JOBSPEC so that SIGHUP is not sent to the job if the        shell receives a SIGHUP      -r        remove only running jobs    Exit Status:    Returns success unless an invalid option or JOBSPEC is given.