From: KO Myung-Hun <[email protected]>

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 c9d34c4..cc79bd8 100644
--- a/tests/genfile.c
+++ b/tests/genfile.c
@@ -831,6 +831,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");
-- 
2.7.0


Reply via email to