Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-09-10 06:11:59 +0400
committerChristopher Faylor <me@cgf.cx>2001-09-10 06:11:59 +0400
commitf3acbe3e3fe8439c303d99d42c60c724d0f1a558 (patch)
tree032ad55732491c3db17cade61965b49cf4e55252
parent6409b03b1ad89db4a4e47ec1e20468d9ec4a4b80 (diff)
* dtable.cc (dtable::fixup_after_fork): Use SetStdHandle appropriately on
inherited fds.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/dtable.cc4
2 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f8f393a8f..6bdc2fac2 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 0b3ad2575..5dc56ee64 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -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 ());
}
}