When Unix first started, even local terminals very often communicated with the system via short-haul modems. (After all, Unix was invented by the phone company.) When someone logged out, the modem hung up the phone -- and conversely, if the modem hung up, a "hangup" signal was sent to the login shell, whereupon it terminated, bringing down all its child processes (Section 24.3) with it.
Go to http://examples.oreilly.com/upt3 for more information on: nohup
The nohup command ("no hangup") allows you to circumvent this. (The GNU version is on the web site.) Simply type:
$ nohup command &
Of course, if you want to run jobs at off hours, you might do even better using at, cron, or batch.
nohup is sometimes handy in shell scripts to make them ignore the HUP and TERM signals ( Section 24.10), though trap (Section 35.17) is more versatile. (In System V, nohup causes a command to ignore HUP and QUIT, but not TERM.)
Copyright © 2003 O'Reilly & Associates. All rights reserved.