|
|
Synchronous jobs started by bash\fP have signal handlers set to the values inherited by the shell from its parent. When job control is not in effect, asynchronous commands ignore .SM SIGINT and .SM SIGQUIT as well. Commands run as a result of command substitution ignore the keyboard-generated job control signals .SM .BR SIGTTIN , .SM .BR SIGTTOU , and .SM .BR SIGTSTP .
The shell exits by default upon receipt of a .SM .BR SIGHUP . Before exiting, it resends the .SM SIGHUP to all jobs, running or stopped. Stopped jobs are sent .SM SIGCONT to ensure that they receive the .SM .BR SIGHUP . To prevent the shell from sending the signal to a particular job, it should be removed from the jobs table with the disown builtin (see .SM "SHELL BUILTIN COMMANDS" below) or marked to not receive .SM SIGHUP using .BR "disown -h" .
If the huponexit shell option has been set with .BR shopt , bash sends a .SM SIGHUP to all jobs when an interactive login shell exits.
When bash\fP receives a signal for which a trap has been set while waiting for a command to complete, the trap will not be executed until the command completes. When bash\fP is waiting for an asynchronous command via the wait\fP builtin, the reception of a signal for which a trap has been set will cause the wait\fP builtin to return immediately with an exit status greater than 128, immediately after which the trap is executed.
Web: http://shell.tjgy.com Email:support@tjgy.com