mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-04 08:07:19 -04:00
windows/svc: do not close service handle
The documentation [1] says "The service status handle does not have to be closed." That makes it seem like it's optional. But actually, closing it raises a user exception, because it's not a legitimate handle to close. This commit also adds the right go build comments with a `go fmt` pass. [1] https://docs.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-registerservicectrlhandlerexa Change-Id: Ibf67c0e8d94c87068720472009b24cecdfda6519 Reviewed-on: https://go-review.googlesource.com/c/sys/+/357250 Trust: Jason A. Donenfeld <Jason@zx2c4.com> Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package svc
|
||||
|
||||
Reference in New Issue
Block a user