diff --git a/CHANGES b/CHANGES index cf4f4e4d19..efd2bc0cda 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +5214. [bug] win32: named now removes its lock file upon shutdown. + [GL #979] + 5213. [bug] win32: Eliminated a race which allowed named.exe running as a service to be killed prematurely during shutdown. [GL #978] diff --git a/bin/named/win32/os.c b/bin/named/win32/os.c index f89c50da41..5d502237b0 100644 --- a/bin/named/win32/os.c +++ b/bin/named/win32/os.c @@ -350,9 +350,9 @@ ns_os_shutdown(void) { if (lockfilefd != -1) { (void) UnlockFile((HANDLE) _get_osfhandle(lockfilefd), 0, 0, 0, 1); - close(lockfilefd); - lockfilefd = -1; } + cleanup_lockfile(); + ntservice_shutdown(); /* This MUST be the last thing done */ }