Bash-5.1 patch 6: make sure child processes forked to execute command substitutions are in the right process group

This commit is contained in:
Chet Ramey
2021-05-04 14:30:17 -04:00
parent cc978a6705
commit f3cd936b81
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
#define PATCHLEVEL 5
#define PATCHLEVEL 6
#endif /* _PATCHLEVEL_H_ */
+7
View File
@@ -6412,6 +6412,13 @@ command_substitute (string, quoted, flags)
/* The currently executing shell is not interactive. */
interactive = 0;
#if defined (JOB_CONTROL)
/* Invariant: in child processes started to run command substitutions,
pipeline_pgrp == shell_pgrp. Other parts of the shell assume this. */
if (pipeline_pgrp > 0 && pipeline_pgrp != shell_pgrp)
shell_pgrp = pipeline_pgrp;
#endif
set_sigint_handler (); /* XXX */
free_pushed_string_input ();