From f3acbe3e3fe8439c303d99d42c60c724d0f1a558 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 10 Sep 2001 02:11:59 +0000 Subject: * dtable.cc (dtable::fixup_after_fork): Use SetStdHandle appropriately on inherited fds. --- winsup/cygwin/dtable.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'winsup/cygwin/dtable.cc') 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 ()); } } -- cgit v1.2.3