diff options
author | Christopher Faylor <me@cgf.cx> | 2001-09-10 02:11:59 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-09-10 02:11:59 +0000 |
commit | f3acbe3e3fe8439c303d99d42c60c724d0f1a558 (patch) | |
tree | 032ad55732491c3db17cade61965b49cf4e55252 /winsup/cygwin/dtable.cc | |
parent | 6409b03b1ad89db4a4e47ec1e20468d9ec4a4b80 (diff) | |
download | cygnal-f3acbe3e3fe8439c303d99d42c60c724d0f1a558.tar.gz cygnal-f3acbe3e3fe8439c303d99d42c60c724d0f1a558.tar.bz2 cygnal-f3acbe3e3fe8439c303d99d42c60c724d0f1a558.zip |
* dtable.cc (dtable::fixup_after_fork): Use SetStdHandle appropriately on
inherited fds.
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r-- | winsup/cygwin/dtable.cc | 4 |
1 files changed, 4 insertions, 0 deletions
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 ()); } } |