diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2009-08-26 10:00:38 -0500 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:41:17 +0200 |
commit | 5a12e7c134274dba706667107d10d231517d3e05 (patch) | |
tree | 55718d5acb710fde798d9f38d0bbaf594ed4b296 /testing/source/bash/bash-4.0-patches/bash40-019 | |
download | current-5a12e7c134274dba706667107d10d231517d3e05.tar.gz |
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009
Slackware 13.0 x86_64 is released as stable! Thanks to everyone who
helped make this release possible -- see the RELEASE_NOTES for the
credits. The ISOs are off to the replicator. This time it will be a
6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We're taking pre-orders now at store.slackware.com. Please consider
picking up a copy to help support the project. Once again, thanks to
the entire Slackware community for all the help testing and fixing
things and offering suggestions during this development cycle.
As always, have fun and enjoy! -P.
Diffstat (limited to 'testing/source/bash/bash-4.0-patches/bash40-019')
-rw-r--r-- | testing/source/bash/bash-4.0-patches/bash40-019 | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/testing/source/bash/bash-4.0-patches/bash40-019 b/testing/source/bash/bash-4.0-patches/bash40-019 new file mode 100644 index 00000000..30efd680 --- /dev/null +++ b/testing/source/bash/bash-4.0-patches/bash40-019 @@ -0,0 +1,125 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.0 +Patch-ID: bash40-019 + +Bug-Reported-by: Oleksiy Melnyk <lex@upc.ua> +Bug-Reference-ID: <20090224142233.D2FEFC004@floyd.upc.ua> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00200.html + +Bug-Description: + +Using an external command as part of the DEBUG trap when job control is +enabled causes pipelines to misbehave. The problem has to do with process +groups assigned to the pipeline and terminal. + +Patch: + +*** ../bash-4.0-patched/jobs.c 2009-01-29 17:09:49.000000000 -0500 +--- jobs.c 2009-04-17 21:08:20.000000000 -0400 +*************** +*** 443,447 **** + the_pipeline = saved_pipeline; + already_making_children = saved_already_making_children; +! if (discard) + discard_pipeline (old_pipeline); + } +--- 443,447 ---- + the_pipeline = saved_pipeline; + already_making_children = saved_already_making_children; +! if (discard && old_pipeline) + discard_pipeline (old_pipeline); + } +*************** +*** 4203,4205 **** +--- 4204,4225 ---- + } + ++ void ++ save_pgrp_pipe (p, clear) ++ int *p; ++ int clear; ++ { ++ p[0] = pgrp_pipe[0]; ++ p[1] = pgrp_pipe[1]; ++ if (clear) ++ pgrp_pipe[0] = pgrp_pipe[1] = -1; ++ } ++ ++ void ++ restore_pgrp_pipe (p) ++ int *p; ++ { ++ pgrp_pipe[0] = p[0]; ++ pgrp_pipe[1] = p[1]; ++ } ++ + #endif /* PGRP_PIPE */ +*** ../bash-4.0-patched/jobs.h 2009-01-04 14:32:29.000000000 -0500 +--- jobs.h 2009-04-17 15:07:51.000000000 -0400 +*************** +*** 236,239 **** +--- 236,241 ---- + + extern void close_pgrp_pipe __P((void)); ++ extern void save_pgrp_pipe __P((int *, int)); ++ extern void restore_pgrp_pipe __P((int *)); + + #if defined (JOB_CONTROL) +*** ../bash-4.0-patched/trap.c 2009-01-16 17:07:53.000000000 -0500 +--- trap.c 2009-04-17 22:22:36.000000000 -0400 +*************** +*** 799,802 **** +--- 799,804 ---- + { + int trap_exit_value; ++ pid_t save_pgrp; ++ int save_pipe[2]; + + /* XXX - question: should the DEBUG trap inherit the RETURN trap? */ +*************** +*** 804,808 **** +--- 806,832 ---- + if ((sigmodes[DEBUG_TRAP] & SIG_TRAPPED) && ((sigmodes[DEBUG_TRAP] & SIG_IGNORED) == 0) && ((sigmodes[DEBUG_TRAP] & SIG_INPROGRESS) == 0)) + { ++ #if defined (JOB_CONTROL) ++ save_pgrp = pipeline_pgrp; ++ pipeline_pgrp = 0; ++ save_pipeline (1); ++ # if defined (PGRP_PIPE) ++ save_pgrp_pipe (save_pipe, 1); ++ # endif ++ stop_making_children (); ++ #endif ++ + trap_exit_value = _run_trap_internal (DEBUG_TRAP, "debug trap"); ++ ++ #if defined (JOB_CONTROL) ++ pipeline_pgrp = save_pgrp; ++ restore_pipeline (1); ++ # if defined (PGRP_PIPE) ++ close_pgrp_pipe (); ++ restore_pgrp_pipe (save_pipe); ++ # endif ++ if (pipeline_pgrp > 0) ++ give_terminal_to (pipeline_pgrp, 1); ++ notify_and_cleanup (); ++ #endif + + #if defined (DEBUGGER) +*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500 +--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 18 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 19 + + #endif /* _PATCHLEVEL_H_ */ |