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, 11 insertions, 1 deletions
diff --git a/contrib/cvs/src/run.c b/contrib/cvs/src/run.c
index d382cef..2d020eb 100644
--- a/contrib/cvs/src/run.c
+++ b/contrib/cvs/src/run.c
@@ -324,9 +324,19 @@ run_exec (stin, stout, sterr, flags)
out:
if (sterr)
(void) close (sherr);
+ else
+ /* ensure things are received by the parent in the correct order
+ * relative to the protocol pipe
+ */
+ cvs_flusherr();
out2:
if (stout)
(void) close (shout);
+ else
+ /* ensure things are received by the parent in the correct order
+ * relative to the protocol pipe
+ */
+ cvs_flushout();
out1:
if (stin)
(void) close (shin);
@@ -444,7 +454,7 @@ void
close_on_exec (fd)
int fd;
{
-#if defined (FD_CLOEXEC) && defined (F_SETFD)
+#ifdef F_SETFD
if (fcntl (fd, F_SETFD, 1))
error (1, errno, "can't set close-on-exec flag on %d", fd);
#endif
OpenPOWER on IntegriCloud