File: 0004-SHELL-Disable-sh-c-command-sh-c-exec-command-optimiza.diff

package info (click to toggle)
dash 0.5.8-2.4
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 1,264 kB
  • sloc: ansic: 13,040; sh: 1,398; makefile: 154
file content (37 lines) | stat: -rw-r--r-- 1,184 bytes parent folder | download
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
32
33
34
35
36
37
From dc3e43ef32309782d0ef5ce72d0b0c89efd1c70f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Glondu?= <glondu@debian.org>
Date: Sun, 25 Sep 2011 19:28:27 +0200
Subject: [PATCH 4/6] [SHELL] Disable sh -c "command" -> sh -c "exec command"
 optimization

Bugs #642706 (bin-prot FTBFS) and #642835 (sexplib310 FTBFS) can be
fixed by reverting the patch submitted at [1]. I don't understand why.

[1] http://thread.gmane.org/gmane.comp.shells.dash/556

While investigating #642706, in the failing case, I observed that a
cpp process called with "sh -c" gets SIGPIPE while writing to
stderr. In the succeeding case, the write is successful, and is read
by the ocamlbuild process that started "sh -c cpp ...".

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 src/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c
index efd7da8..e1418a9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -171,7 +171,7 @@ state2:
 state3:
 	state = 4;
 	if (minusc)
-		evalstring(minusc, sflag ? 0 : EV_EXIT);
+		evalstring(minusc, 0);
 
 	if (sflag || minusc == NULL) {
 state4:	/* XXX ??? - why isn't this before the "if" statement */
-- 
2.1.0