OSDN Git Service

* dtable.cc (dtable::fixup_after_fork): Use SetStdHandle appropriately on
authorcgf <cgf>
Mon, 10 Sep 2001 02:11:59 +0000 (02:11 +0000)
committercgf <cgf>
Mon, 10 Sep 2001 02:11:59 +0000 (02:11 +0000)
inherited fds.

winsup/cygwin/ChangeLog
winsup/cygwin/dtable.cc

index f8f393a..6bdc2fa 100644 (file)
@@ -1,3 +1,8 @@
+Sun Sep  9 22:11:27 2001  Christopher Faylor <cgf@cygnus.com>
+
+       * dtable.cc (dtable::fixup_after_fork): Use SetStdHandle appropriately
+       on inherited fds.
+
 Sun Sep  9 20:09:11 2001  Christopher Faylor <cgf@cygnus.com>
 
        * sigproc.cc (NZOMBIES): Reduce substantially to minimize memory use.
index 0b3ad25..5dc56ee 100644 (file)
@@ -536,6 +536,10 @@ dtable::fixup_after_fork (HANDLE parent)
            debug_printf ("fd %d (%s)", i, fh->get_name ());
            fh->fixup_after_fork (parent);
          }
+       if (i == 0)
+         SetStdHandle (std_consts[i], fh->get_io_handle ());
+       else if (i <= 2)
+         SetStdHandle (std_consts[i], fh->get_output_handle ());
       }
 }