summaryrefslogtreecommitdiff
path: root/execute_cmd.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2012-01-09 08:22:28 -0500
committerChet Ramey <chet.ramey@case.edu>2012-01-09 08:22:28 -0500
commitadf2f6096340edf24b9a20a1697c5ac2e7d79be0 (patch)
treef949e9071d49cf8e0a1de1e9399511144645b4df /execute_cmd.c
parent987daba4c451dc7e467c26bb953a308289a6f8b6 (diff)
downloadbash-adf2f6096340edf24b9a20a1697c5ac2e7d79be0.tar.gz
commit bash-20110701 snapshot
Diffstat (limited to 'execute_cmd.c')
-rw-r--r--execute_cmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/execute_cmd.c b/execute_cmd.c
index ff63eb33..9007dff9 100644
--- a/execute_cmd.c
+++ b/execute_cmd.c
@@ -2271,6 +2271,7 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close)
if (ignore_return && cmd)
cmd->flags |= CMD_IGNORE_RETURN;
+#if defined (JOB_CONTROL)
lastpipe_flag = 0;
begin_unwind_frame ("lastpipe-exec");
lstdin = -1;
@@ -2294,11 +2295,14 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close)
}
if (prev >= 0)
add_unwind_protect (close, prev);
+#endif
exec_result = execute_command_internal (cmd, asynchronous, prev, pipe_out, fds_to_close);
+#if defined (JOB_CONTROL)
if (lstdin > 0)
restore_stdin (lstdin);
+#endif
if (prev >= 0)
close (prev);