Bash-5.0 patch 7: fix exec builtin leaving the terminal in the wrong process group
This commit is contained in:
parent
dfd2cc6ac5
commit
3ba697465b
2 changed files with 6 additions and 8 deletions
12
jobs.c
12
jobs.c
|
@ -4837,15 +4837,13 @@ void
|
|||
end_job_control ()
|
||||
{
|
||||
if (job_control)
|
||||
{
|
||||
terminate_stopped_jobs ();
|
||||
terminate_stopped_jobs ();
|
||||
|
||||
if (original_pgrp >= 0)
|
||||
give_terminal_to (original_pgrp, 1);
|
||||
}
|
||||
if (original_pgrp >= 0 && terminal_pgrp != original_pgrp)
|
||||
give_terminal_to (original_pgrp, 1);
|
||||
|
||||
if (original_pgrp >= 0)
|
||||
setpgid (0, original_pgrp);
|
||||
if (original_pgrp >= 0 && setpgid (0, original_pgrp) == 0)
|
||||
shell_pgrp = original_pgrp;
|
||||
}
|
||||
|
||||
/* Restart job control by closing shell tty and reinitializing. This is
|
||||
|
|
|
@ -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 6
|
||||
#define PATCHLEVEL 7
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
|
|
Loading…
Add table
Reference in a new issue