changeset 6614:e095c5efe2e0

(child_setup): Check out==err when relocating fds.
author Karl Heuer <kwzh@gnu.org>
date Thu, 31 Mar 1994 22:19:27 +0000
parents b872dcd6cbbd
children 96ddf85642d1
files src/callproc.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/callproc.c	Thu Mar 31 22:01:12 1994 +0000
+++ b/src/callproc.c	Thu Mar 31 22:19:27 1994 +0000
@@ -646,8 +646,13 @@
      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);