summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-05-09 15:41:47 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-05-09 15:41:47 +0000
commitb42e1a56a48282be171cc5c094a8b0a3b55da453 (patch)
treeeabe179525d6e6742582101b45a7a18f625afd86 /src
parent1ecd905f5bfaa3299efe9a78e068f9784b246124 (diff)
downloadexecline-b42e1a56a48282be171cc5c094a8b0a3b55da453.tar.xz
- Fix pipeline when stdin or stdout is closed
- rc for 2.1.2.1
Diffstat (limited to 'src')
-rw-r--r--src/execline/pipeline.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/execline/pipeline.c b/src/execline/pipeline.c
index 42a230b..ca5ef0f 100644
--- a/src/execline/pipeline.c
+++ b/src/execline/pipeline.c
@@ -66,6 +66,7 @@ int main (int argc, char const **argv, char const *const *envp)
if (!pid) strerr_diefu2sys(111, "spawn ", argv[0]) ;
}
if (fd_move(w, fd) < 0) strerr_diefu1sys(111, "fd_move") ;
+ if (w == fd) uncoe(fd) ;
{
#ifdef EXECLINE_OLD_VARNAMES
char fmt[UINT64_FMT * 2 + 10] = "!=" ;