mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Bash1 incorrectly restores signals when executing programs. This causes
many programs to use 100% CPU after a login session was ungracefully closed because SIGHUP will not be delivered to processes started from bash1 used as login shell (SIGHUP is ignored when bash1 is running as login shell and telnet connection is made because ignored SIGHUP is inherited from inetd->telnetd->getty->login; ignored SIGHUP is restored before starting any program from shell). These patches were derived from Bash 2.03, and attempt to impliement the Bash 2.03 behavior. PR: 14943 Submitted by: Max Khon (fjoe@iclub.nsu.ru)
This commit is contained in:
parent
6b7daea23a
commit
d185596316
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=23460
3 changed files with 38 additions and 0 deletions
12
shells/bash1/files/patch-aj
Normal file
12
shells/bash1/files/patch-aj
Normal file
|
@ -0,0 +1,12 @@
|
|||
*** ./subst.c.orig Wed Nov 17 18:40:38 1999
|
||||
--- ./subst.c Wed Nov 17 18:40:59 1999
|
||||
*************** process_substitute (string, open_for_rea
|
||||
*** 2021,2026 ****
|
||||
--- 2021,2027 ----
|
||||
pid = make_child ((char *)NULL, 1);
|
||||
if (pid == 0)
|
||||
{
|
||||
+ reset_terminating_signals();
|
||||
/* Cancel traps, in trap.c. */
|
||||
restore_original_signals ();
|
||||
setup_async_signals ();
|
13
shells/bash1/files/patch-ak
Normal file
13
shells/bash1/files/patch-ak
Normal file
|
@ -0,0 +1,13 @@
|
|||
*** ./trap.c.orig Wed Nov 17 18:36:19 1999
|
||||
--- ./trap.c Wed Nov 17 18:36:29 1999
|
||||
*************** restore_original_signals ()
|
||||
*** 556,563 ****
|
||||
{
|
||||
register int i;
|
||||
|
||||
- reset_terminating_signals (); /* in shell.c */
|
||||
-
|
||||
if (sigmodes[0] & SIG_TRAPPED)
|
||||
{
|
||||
free_trap_command (0);
|
||||
--- 556,561 ----
|
13
shells/bash1/files/patch-al
Normal file
13
shells/bash1/files/patch-al
Normal file
|
@ -0,0 +1,13 @@
|
|||
*** ./execute_cmd.c.orig Wed Nov 17 18:37:45 1999
|
||||
--- ./execute_cmd.c Wed Nov 17 18:37:53 1999
|
||||
*************** execute_command_internal (command, async
|
||||
*** 340,345 ****
|
||||
--- 340,347 ----
|
||||
{
|
||||
int user_subshell, return_code, function_value;
|
||||
|
||||
+ reset_terminating_signals();
|
||||
+
|
||||
/* Cancel traps, in trap.c. */
|
||||
restore_original_signals ();
|
||||
if (asynchronous)
|
Loading…
Add table
Reference in a new issue