0007-bash50-007.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. From https://ftp.gnu.org/gnu/bash/bash-5.0-patches/bash50-007
  2. Signed-off-by: Pascal de Bruijn <p.debruijn@unilogic.nl>
  3. BASH PATCH REPORT
  4. =================
  5. Bash-Release: 5.0
  6. Patch-ID: bash50-007
  7. Bug-Reported-by: Grisha Levit <grishalevit@gmail.com>
  8. Bug-Reference-ID: <CAMu=BroHapG1AS3xB5SQaCX2XKu=-E2Ob9uW6LNuHvd=YohrDw@mail.gmail.com>
  9. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2019-02/msg00067.html
  10. Bug-Description:
  11. Running `exec' when job control was disabled, even temporarily, but after it
  12. had been initialized, could leave the terminal in the wrong process group for
  13. the executed process.
  14. Patch (apply with `patch -p0'):
  15. *** ../bash-5.0-patched/jobs.c 2018-12-06 11:44:34.000000000 -0500
  16. --- b/jobs.c 2019-04-12 15:15:10.000000000 -0400
  17. ***************
  18. *** 4838,4850 ****
  19. {
  20. if (job_control)
  21. ! {
  22. ! terminate_stopped_jobs ();
  23. ! if (original_pgrp >= 0)
  24. ! give_terminal_to (original_pgrp, 1);
  25. ! }
  26. ! if (original_pgrp >= 0)
  27. ! setpgid (0, original_pgrp);
  28. }
  29. --- 4838,4848 ----
  30. {
  31. if (job_control)
  32. ! terminate_stopped_jobs ();
  33. ! if (original_pgrp >= 0 && terminal_pgrp != original_pgrp)
  34. ! give_terminal_to (original_pgrp, 1);
  35. ! if (original_pgrp >= 0 && setpgid (0, original_pgrp) == 0)
  36. ! shell_pgrp = original_pgrp;
  37. }
  38. *** ../bash-5.0/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
  39. --- b/patchlevel.h 2016-10-01 11:01:28.000000000 -0400
  40. ***************
  41. *** 26,30 ****
  42. looks for to find the patch level (for the sccs version string). */
  43. ! #define PATCHLEVEL 6
  44. #endif /* _PATCHLEVEL_H_ */
  45. --- 26,30 ----
  46. looks for to find the patch level (for the sccs version string). */
  47. ! #define PATCHLEVEL 7
  48. #endif /* _PATCHLEVEL_H_ */