- 论坛徽章:
- 0
|
回复 1# greenandtree
34.6.1 Handling of SIGHUP by the Shell
Some job-control shells also send SIGHUP to stopped background jobs if the
shell exits normally(e.g., when we explicitly log out or type Control-D in a shell
window). This is done by both bash and the Korn shell (after printing a message
on the first logout attempt).
The nohup(1) command can be used to make a command immune to the
SIGHUP signal—that is, start it with the disposition of SIGHUP set to SIG_IGN. The bash
built-in command disown serves a similar purpose, removing a job from the
shell’s list of jobs, so that the job is not sent SIGHUP when the shell terminates. |
|