diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 1999-11-28 11:07:19 +0800 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 1999-11-28 11:07:19 +0800 |
commit | d18559631620763245c7b3b664673f7f8be7eb9c (patch) | |
tree | e4f0baf1572a397685dafaa990c55cfd425a9432 /shells | |
parent | 6b7daea23ac02f8d9b8ef95bb9f7e81f6d246048 (diff) | |
download | freebsd-ports-gnome-d18559631620763245c7b3b664673f7f8be7eb9c.tar.gz freebsd-ports-gnome-d18559631620763245c7b3b664673f7f8be7eb9c.tar.zst freebsd-ports-gnome-d18559631620763245c7b3b664673f7f8be7eb9c.zip |
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)
Diffstat (limited to 'shells')
-rw-r--r-- | shells/bash1/files/patch-aj | 12 | ||||
-rw-r--r-- | shells/bash1/files/patch-ak | 13 | ||||
-rw-r--r-- | shells/bash1/files/patch-al | 13 |
3 files changed, 38 insertions, 0 deletions
diff --git a/shells/bash1/files/patch-aj b/shells/bash1/files/patch-aj new file mode 100644 index 000000000000..fed357fc09d3 --- /dev/null +++ b/shells/bash1/files/patch-aj @@ -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 (); diff --git a/shells/bash1/files/patch-ak b/shells/bash1/files/patch-ak new file mode 100644 index 000000000000..db1ef8527ed3 --- /dev/null +++ b/shells/bash1/files/patch-ak @@ -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 ---- diff --git a/shells/bash1/files/patch-al b/shells/bash1/files/patch-al new file mode 100644 index 000000000000..77f2b3aa1e06 --- /dev/null +++ b/shells/bash1/files/patch-al @@ -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) |