diff options
author | Chet Ramey <chet.ramey@case.edu> | 2011-11-21 20:49:12 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2011-11-21 20:49:12 -0500 |
commit | 89a92869e56aba4e4cab2d639c00a86f0545c862 (patch) | |
tree | e1cd4da50318af8ab1f3141d39d4b0b8e1e7c500 /jobs.c | |
parent | 17345e5ad288f7543b77b23a25aa380eacc279f2 (diff) | |
download | bash-89a92869e56aba4e4cab2d639c00a86f0545c862.tar.gz |
Bash-4.0 patchlevel 38bash-4.0.38bash-4.0
Diffstat (limited to 'jobs.c')
-rw-r--r-- | jobs.c | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -442,7 +442,7 @@ restore_pipeline (discard) old_pipeline = the_pipeline; the_pipeline = saved_pipeline; already_making_children = saved_already_making_children; - if (discard) + if (discard && old_pipeline) discard_pipeline (old_pipeline); } @@ -4202,4 +4202,23 @@ close_pgrp_pipe () sh_closepipe (pgrp_pipe); } +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 */ |