summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src/run.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cvs/src/run.c')
-rw-r--r--contrib/cvs/src/run.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/cvs/src/run.c b/contrib/cvs/src/run.c
index 74e418d..5b59bca 100644
--- a/contrib/cvs/src/run.c
+++ b/contrib/cvs/src/run.c
@@ -445,6 +445,13 @@ piped_child (command, tofdp, fromfdp)
if (pipe (from_child_pipe) < 0)
error (1, errno, "cannot create pipe");
+#ifdef USE_SETMODE_BINARY
+ setmode (to_child_pipe[0], O_BINARY);
+ setmode (to_child_pipe[1], O_BINARY);
+ setmode (from_child_pipe[0], O_BINARY);
+ setmode (from_child_pipe[1], O_BINARY);
+#endif
+
#ifdef HAVE_VFORK
pid = vfork ();
#else
@@ -506,6 +513,11 @@ filter_stream_through_program (oldfd, dir, prog, pidp)
if (pipe (p))
error (1, errno, "cannot create pipe");
+#ifdef USE_SETMODE_BINARY
+ setmode (p[0], O_BINARY);
+ setmode (p[1], O_BINARY);
+#endif
+
#ifdef HAVE_VFORK
newpid = vfork ();
#else
OpenPOWER on IntegriCloud