Bash applies the same logic on SIGHUP as on normal exit now. Jobs are

sent a SIGHUP only when that was explicitely requested via shopt
huponexit. Thus it behaves like other shells (ksh, tcsh, ash,...).
Background processes are no longer terminated when closing the terminal.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22188 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2007-09-06 02:20:13 +00:00
parent 923efaa872
commit eb4ea3062e
1 changed files with 2 additions and 1 deletions

View File

@ -54,6 +54,7 @@ extern int last_command_exit_value;
extern int return_catch_flag; extern int return_catch_flag;
extern int loop_level, continuing, breaking; extern int loop_level, continuing, breaking;
extern int parse_and_execute_level, shell_initialized; extern int parse_and_execute_level, shell_initialized;
extern int hup_on_exit;
/* Non-zero after SIGINT. */ /* Non-zero after SIGINT. */
int interrupt_state; int interrupt_state;
@ -412,7 +413,7 @@ termination_unwind_protect (sig)
#endif /* HISTORY */ #endif /* HISTORY */
#if defined (JOB_CONTROL) #if defined (JOB_CONTROL)
if (interactive && sig == SIGHUP) if (interactive && sig == SIGHUP && hup_on_exit)
hangup_all_jobs (); hangup_all_jobs ();
end_job_control (); end_job_control ();
#endif /* JOB_CONTROL */ #endif /* JOB_CONTROL */