diff options
author | Christopher Faylor <me@cgf.cx> | 2008-07-27 18:52:46 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2008-07-27 18:52:46 +0400 |
commit | 904413e731347d5fd0e8356c3f79744eb3d977a4 (patch) | |
tree | dfda56c0bf0bfe3d28273c1de3c3b006e04e6cfb /winsup/cygwin/init.cc | |
parent | bfd2b1c9307ebe2cf8611b447cafa2809c9ac8dd (diff) |
* shared_info.h (shared_destroy): Declare.
* shared.cc (shared_destroy): Define new function to destroy shared memory
regions.
* init.cc (dll_entry): Call shared_destroy when dll detaches from the process.
Diffstat (limited to 'winsup/cygwin/init.cc')
-rw-r--r-- | winsup/cygwin/init.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc index b05427592..1e633f432 100644 --- a/winsup/cygwin/init.cc +++ b/winsup/cygwin/init.cc @@ -12,6 +12,7 @@ details. */ #include "winsup.h" #include "cygtls.h" #include "ntdll.h" +#include "shared_info.h" static DWORD _my_oldfunc; @@ -142,6 +143,8 @@ dll_entry (HANDLE h, DWORD reason, void *static_load) _my_oldfunc = TlsAlloc (); break; case DLL_PROCESS_DETACH: + if (dynamically_loaded) + shared_destroy (); break; case DLL_THREAD_ATTACH: if (hwait_sig) |