summaryrefslogtreecommitdiff
path: root/shells/bash/patches/patch-execute_cmd.c
blob: d3c6271eaf4a2085a58c627b9042382c2cc6521a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$NetBSD: patch-execute_cmd.c,v 1.1 2013/02/12 23:31:41 tcort Exp $

Allow bash to compile with JOB_CONTROL disabled.

http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-018

--- execute_cmd.c.orig	Wed Feb  9 22:32:25 2011
+++ execute_cmd.c	Tue Feb 12 11:48:00 2013
@@ -2196,6 +2196,7 @@
   if (ignore_return && cmd)
     cmd->flags |= CMD_IGNORE_RETURN;
 
+#if defined (JOB_CONTROL)
   lastpipe_flag = 0;
   begin_unwind_frame ("lastpipe-exec");
   lstdin = -1;
@@ -2219,11 +2220,14 @@
     }	  
   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);