]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-procmgmt-library-20070629
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 30 Jun 2007 00:52:54 +0000 (00:52 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 30 Jun 2007 00:52:54 +0000 (00:52 +0000)
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)

src/procmgmt/procmgmt_nt.c

index 83e9230522ff86be382c0236c84332e2452310fc..3b635785aed183c18db66889094a0b4b7c47863c 100644 (file)
@@ -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);
 }