mirror of
https://github.com/golang/sys.git
synced 2026-02-08 19:56:04 +03:00
windows: remove ErrorControl value check in CreateService
ErrorIgnore is 0 which means we shouldn't rely on zero value checking. Fixes golang/go#43094 Change-Id: I7af3132cfe58d73c7abab92203fb02a0ada15218 Reviewed-on: https://go-review.googlesource.com/c/sys/+/276572 Trust: Meng Zhuo <mzh@golangcn.org> Trust: Alex Brainman <alex.brainman@gmail.com> Trust: Jason A. Donenfeld <Jason@zx2c4.com> Run-TryBot: Meng Zhuo <mzh@golangcn.org> Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
This commit is contained in:
@@ -117,9 +117,6 @@ func (m *Mgr) CreateService(name, exepath string, c Config, args ...string) (*Se
|
||||
if c.StartType == 0 {
|
||||
c.StartType = StartManual
|
||||
}
|
||||
if c.ErrorControl == 0 {
|
||||
c.ErrorControl = ErrorNormal
|
||||
}
|
||||
if c.ServiceType == 0 {
|
||||
c.ServiceType = windows.SERVICE_WIN32_OWN_PROCESS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user