handle signals at more places in brace expansion; fix for subshells changing terminal process group on signals

This commit is contained in:
Chet Ramey
2022-12-21 09:57:36 -05:00
parent c4a2e37470
commit 001918cdec
11 changed files with 139 additions and 41 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
This file is set.def, from which is created set.c.
It implements the "set" and "unset" builtins in Bash.
Copyright (C) 1987-2021 Free Software Foundation, Inc.
Copyright (C) 1987-2022 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -434,7 +434,7 @@ set_edit_mode (on_or_off, option_name)
{
rl_variable_bind ("editing-mode", option_name);
if (interactive)
if (interactive && command_execution_string == 0)
with_input_from_stdin ();
no_line_editing = 0;
}
@@ -443,7 +443,7 @@ set_edit_mode (on_or_off, option_name)
isemacs = rl_editing_mode == 1;
if ((isemacs && *option_name == 'e') || (!isemacs && *option_name == 'v'))
{
if (interactive)
if (interactive && command_execution_string == 0)
with_input_from_stream (stdin, "stdin");
no_line_editing = 1;
}
+5 -4
View File
@@ -1,7 +1,7 @@
This file is type.def, from which is created type.c.
It implements the builtin "type" in Bash.
Copyright (C) 1987-2020 Free Software Foundation, Inc.
Copyright (C) 1987-2022 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -163,7 +163,7 @@ type_builtin (list)
dflags |= CDESC_TYPE;
dflags &= ~(CDESC_PATH_ONLY|CDESC_SHORTDESC);
break;
case 'P': /* shorthand for type -ap */
case 'P': /* force path search only plus hash table lookup */
dflags |= (CDESC_PATH_ONLY|CDESC_FORCE_PATH);
dflags &= ~(CDESC_TYPE|CDESC_SHORTDESC);
break;
@@ -242,7 +242,7 @@ describe_command (command, dflags)
found = 1;
if (all == 0)
if (all == 0) /* type -p returns, any executable file would not have precedence */
return (1);
}
#endif /* ALIAS */
@@ -345,7 +345,8 @@ describe_command (command, dflags)
printf ("%s\n", full_path);
free (full_path);
return (1);
if (all == 0)
return (1);
}
}