]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-4.2 patch 18
authorChet Ramey <chet.ramey@case.edu>
Wed, 23 Nov 2011 01:03:16 +0000 (20:03 -0500)
committerChet Ramey <chet.ramey@case.edu>
Wed, 23 Nov 2011 01:03:16 +0000 (20:03 -0500)
execute_cmd.c
patchlevel.h

index 485b0c791eafd5ae46c6dbc8e92ee81bf0b53153..30b04601ef74560191699ceaa2fcbe26bb01db82 100644 (file)
@@ -2196,6 +2196,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;
@@ -2215,15 +2216,19 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close)
          lastpipe_jid = stop_pipeline (0, (COMMAND *)NULL);    /* XXX */
          add_unwind_protect (lastpipe_cleanup, lastpipe_jid);
        }
-      cmd->flags |= CMD_LASTPIPE;
+      if (cmd)
+       cmd->flags |= CMD_LASTPIPE;
     }    
   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);
index 5de379f286805147fb8d3297e2358870a7952222..0d980e6869a6f8f20b672e78646a664d1271f25d 100644 (file)
@@ -25,6 +25,6 @@
    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
    looks for to find the patch level (for the sccs version string). */
 
-#define PATCHLEVEL 17
+#define PATCHLEVEL 18
 
 #endif /* _PATCHLEVEL_H_ */