diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-07-04 09:47:10 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-07-04 09:47:10 +0000 |
commit | d3ed549d518c216a42b43e20f224be5323ee66a8 (patch) | |
tree | 3eee2ab538e96166e060405cb9ef6a954b1dddbf | |
parent | d51a9c25bd36b158c1e3f844f7c935a953009973 (diff) | |
download | cygnal-d3ed549d518c216a42b43e20f224be5323ee66a8.tar.gz cygnal-d3ed549d518c216a42b43e20f224be5323ee66a8.tar.bz2 cygnal-d3ed549d518c216a42b43e20f224be5323ee66a8.zip |
* dtable.cc (dtable::init_std_file_from_handle): Change test for console
device in call to fh->init to avoid conhost crash on W7.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/dtable.cc | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 66e982ba4..504b5f128 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 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 test and call to parse_options if found. diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 2efd4e878..ec110ecdc 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -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 ()); |