diff -Naur cvs-1.11.1p1-ORIG/src/run.c cvs-1.11.1p1/src/run.c --- cvs-1.11.1p1-ORIG/src/run.c Wed Nov 28 17:24:29 2001 +++ cvs-1.11.1p1/src/run.c Tue Jan 8 01:46:17 2002 @@ -405,6 +405,7 @@ int pid; int to_child_pipe[2]; int from_child_pipe[2]; + int error_fd; if (pipe (to_child_pipe) < 0) error (1, errno, "cannot create pipe"); @@ -418,6 +419,9 @@ setmode (from_child_pipe[1], O_BINARY); #endif + if ((error_fd = open("/dev/null", O_RDONLY)) < 0) + error (1, errno, "cannot open /dev/null"); + #ifdef HAVE_VFORK pid = vfork (); #else @@ -435,6 +439,10 @@ error (1, errno, "cannot close pipe"); if (dup2 (from_child_pipe[1], STDOUT_FILENO) < 0) error (1, errno, "cannot dup2 pipe"); + if (dup2 (error_fd, STDERR_FILENO) < 0) + error (1, errno, "cannot dup2 pipe"); + if (close (error_fd) < 0) + error (1, errno, "cannot close pipe"); execvp (command[0], command); error (1, errno, "cannot exec %s", command[0]);