From: Jeffrey Altman Date: Sat, 30 Jun 2007 00:51:36 +0000 (+0000) Subject: windows-procmgmt-library-20070629 X-Git-Tag: BP-openafs-windows-kdfs-ifs~627 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=43e97a8ede45ee1c469f9e275f58d50d740977df;p=packages%2Fo%2Fopenafs.git 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. --- 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); }