]> git.eshelyaron.com Git - emacs.git/commitdiff
(child_setup): Check out==err when relocating fds.
authorKarl Heuer <kwzh@gnu.org>
Thu, 31 Mar 1994 22:19:27 +0000 (22:19 +0000)
committerKarl Heuer <kwzh@gnu.org>
Thu, 31 Mar 1994 22:19:27 +0000 (22:19 +0000)
src/callproc.c

index bce5b505df3d594256123fafcc475fe3f82ec223..9bf6d23b9acb805abea518a30cacb09421341567 100644 (file)
@@ -646,8 +646,13 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir)
      started with its standard in, out, or error closed, as might
      happen under X.  */
   in = relocate_fd (in, 3);
-  out = relocate_fd (out, 3);
-  err = relocate_fd (err, 3);
+  if (out == err)
+    err = out = relocate_fd (out, 3);
+  else
+    {
+      out = relocate_fd (out, 3);
+      err = relocate_fd (err, 3);
+    }
 
   close (0);
   close (1);