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.9.5


Reply via email to