diff options
author | Christopher Faylor <me@cgf.cx> | 2009-07-17 18:17:11 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2009-07-17 18:17:11 +0000 |
commit | 486a2c9610f181a554686cc6f752865f40e5f08e (patch) | |
tree | 43988c6c242b7670b7ef63b2f86f0b7acf8e6d17 /winsup/cygwin/dll_init.cc | |
parent | d2445fa2cc4f8ce1021e75e1a690083ea6b0db7e (diff) | |
download | newlib-486a2c9610f181a554686cc6f752865f40e5f08e.zip newlib-486a2c9610f181a554686cc6f752865f40e5f08e.tar.gz newlib-486a2c9610f181a554686cc6f752865f40e5f08e.tar.bz2 |
* cygtls.cc (_cygtls::init_exception_handler): Test for e, not e->prev or we
could still end up adding our handler twice. Add comment explaining what we're
doing.
* dll_init.cc (dll_dllcrt0_1): Clarify comment.
Diffstat (limited to 'winsup/cygwin/dll_init.cc')
-rw-r--r-- | winsup/cygwin/dll_init.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc index 6743d26..1f83fb9 100644 --- a/winsup/cygwin/dll_init.cc +++ b/winsup/cygwin/dll_init.cc @@ -312,12 +312,13 @@ dll_dllcrt0_1 (VOID *x) per_process*& p = ((dllcrt0_info *)x)->p; int& res = ((dllcrt0_info *)x)->res; - /* Windows apparently installs a bunch of exception handlers prior to - this function getting called and one of them may trip before cygwin - gets to it. So, install our own exception handler only. - FIXME: It is possible that we may have to save state of the - previous exception handler chain and restore it, if problems - are noted. */ + /* Make sure that our exception handler is installed. + That should always be the case but this just makes sure. + + At some point, we may want to just remove this code since + the exception handler should be guaranteed to be installed. + I'm leaving it in until potentially after the release of + 1.7.1 */ _my_tls.init_exception_handler (_cygtls::handle_exceptions); if (p == NULL) |