* dtable.cc (dtable::init_std_file_from_handle): Change test for console

device in call to fh->init to avoid conhost crash on W7.
This commit is contained in:
Corinna Vinschen 2011-07-04 09:47:10 +00:00
parent d51a9c25bd
commit d3ed549d51
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-07-04 Corinna Vinschen <corinna@vinschen.de>
* dtable.cc (dtable::init_std_file_from_handle): Change test for console
device in call to fh->init to avoid conhost crash on W7.
2011-07-04 Corinna Vinschen <corinna@vinschen.de>
* environ.cc (environ_init): Reinstantiate on-the-fly CYGWIN variable

View File

@ -383,7 +383,7 @@ dtable::init_std_file_from_handle (int fd, HANDLE handle)
This needs further investigation but the workaround not to close
the handles will have a marginal hit of three extra handles per
process at most. */
if (!fh->init (dev == FH_CONSOLE && wincap.has_console_handle_problem ()
if (!fh->init (iscons_dev (dev) && wincap.has_console_handle_problem ()
? INVALID_HANDLE_VALUE : handle, access, bin))
api_fatal ("couldn't initialize fd %d for %s", fd, fh->get_name ());