From: Jeffrey Altman Date: Sat, 30 Jun 2007 00:52:54 +0000 (+0000) Subject: DEVEL15-windows-procmgmt-library-20070629 X-Git-Tag: openafs-devel-1_5_21~21 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a8b1b612335ffb534768081fba568c61bf340560;p=packages%2Fo%2Fopenafs.git DEVEL15-windows-procmgmt-library-20070629 Since the library creates its own background thread, the library must load its own reference to itself to prevent the library from being unloaded behind its back. (cherry picked from commit 43e97a8ede45ee1c469f9e275f58d50d740977df) --- diff --git a/src/procmgmt/procmgmt_nt.c b/src/procmgmt/procmgmt_nt.c index 83e923052..3b635785a 100644 --- a/src/procmgmt/procmgmt_nt.c +++ b/src/procmgmt/procmgmt_nt.c @@ -251,6 +251,7 @@ static DWORD WINAPI RemoteSignalListenerThread(LPVOID param) { HANDLE sigPipeHandle = (HANDLE) param; + HMODULE hLib = LoadLibrary("AFSPROCMGMT.DLL"); while (1) { /* wait for pipe client to connect */ @@ -296,6 +297,7 @@ RemoteSignalListenerThread(LPVOID param) } /* never reached */ + FreeLibrary(hLib); return (0); }