You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.8 KiB

  1. Index: bash-4.4/jobs.c
  2. ===================================================================
  3. --- bash-4.4.orig/jobs.c
  4. +++ bash-4.4/jobs.c
  5. @@ -453,6 +453,21 @@ cleanup_the_pipeline ()
  6. discard_pipeline (disposer);
  7. }
  8. +void
  9. +discard_last_procsub_child ()
  10. +{
  11. + PROCESS *disposer;
  12. + sigset_t set, oset;
  13. +
  14. + BLOCK_CHILD (set, oset);
  15. + disposer = last_procsub_child;
  16. + last_procsub_child = (PROCESS *)NULL;
  17. + UNBLOCK_CHILD (oset);
  18. +
  19. + if (disposer)
  20. + discard_pipeline (disposer);
  21. +}
  22. +
  23. struct pipeline_saver *
  24. alloc_pipeline_saver ()
  25. {
  26. Index: bash-4.4/jobs.h
  27. ===================================================================
  28. --- bash-4.4.orig/jobs.h
  29. +++ bash-4.4/jobs.h
  30. @@ -190,6 +190,7 @@ extern JOB **jobs;
  31. extern void making_children __P((void));
  32. extern void stop_making_children __P((void));
  33. extern void cleanup_the_pipeline __P((void));
  34. +extern void discard_last_procsub_child __P((void));
  35. extern void save_pipeline __P((int));
  36. extern PROCESS *restore_pipeline __P((int));
  37. extern void start_pipeline __P((void));
  38. Index: bash-4.4/patchlevel.h
  39. ===================================================================
  40. --- bash-4.4.orig/patchlevel.h
  41. +++ bash-4.4/patchlevel.h
  42. @@ -25,6 +25,6 @@
  43. regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
  44. looks for to find the patch level (for the sccs version string). */
  45. -#define PATCHLEVEL 3
  46. +#define PATCHLEVEL 4
  47. #endif /* _PATCHLEVEL_H_ */
  48. Index: bash-4.4/subst.c
  49. ===================================================================
  50. --- bash-4.4.orig/subst.c
  51. +++ bash-4.4/subst.c
  52. @@ -5808,10 +5808,7 @@ process_substitute (string, open_for_rea
  53. {
  54. #if defined (JOB_CONTROL)
  55. if (last_procsub_child)
  56. - {
  57. - discard_pipeline (last_procsub_child);
  58. - last_procsub_child = (PROCESS *)NULL;
  59. - }
  60. + discard_last_procsub_child ();
  61. last_procsub_child = restore_pipeline (0);
  62. #endif