[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] [PATCH 4/4] genfile: set pipe handles to binary mode
From: |
KO Myung-Hun |
Subject: |
[Bug-tar] [PATCH 4/4] genfile: set pipe handles to binary mode |
Date: |
Tue, 25 Nov 2014 18:06:08 +0900 |
On OS/2, pipe() is opened in text mode.
* tests/genfile.c (exec_command): Set pipe handles to binary mode.
---
tests/genfile.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/genfile.c b/tests/genfile.c
index a85b12d..61b5cc9 100644
--- a/tests/genfile.c
+++ b/tests/genfile.c
@@ -832,6 +832,9 @@ exec_command (void)
if (pipe (fd) != 0)
error (EXIT_FAILURE, errno, "pipe");
+ SET_BINARY_MODE (fd[0]);
+ SET_BINARY_MODE (fd[1]);
+
pid = fork ();
if (pid == -1)
error (EXIT_FAILURE, errno, "fork");
--
1.8.5.2