diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-01-15 06:38:16 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-01-16 04:02:37 +0000 |
commit | d2de9bd59c068c1bfcb4293de4286196dacf2e43 (patch) | |
tree | aa433387b5e52d70d74e75170dc012b268a5c33a /src/runtime/os_windows.go | |
parent | f77e7ed7e374311e684fe810bf1aabaf18965a8a (diff) | |
download | go-d2de9bd59c068c1bfcb4293de4286196dacf2e43.tar.gz go-d2de9bd59c068c1bfcb4293de4286196dacf2e43.zip |
runtime: ignore power notification error seen on Windows Docker
Fixes #36557
Change-Id: Ia8125f382d5e14e5612da811268a58971cc9ac08
Reviewed-on: https://go-review.googlesource.com/c/go/+/214917
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/os_windows.go')
-rw-r--r-- | src/runtime/os_windows.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/runtime/os_windows.go b/src/runtime/os_windows.go index 91e147fca9..bddc25729a 100644 --- a/src/runtime/os_windows.go +++ b/src/runtime/os_windows.go @@ -294,8 +294,9 @@ func loadOptionalSyscalls() { func monitorSuspendResume() { const ( - _DEVICE_NOTIFY_CALLBACK = 2 - _ERROR_FILE_NOT_FOUND = 2 + _DEVICE_NOTIFY_CALLBACK = 2 + _ERROR_FILE_NOT_FOUND = 2 + _ERROR_INVALID_PARAMETERS = 87 ) type _DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS struct { callback uintptr @@ -333,6 +334,10 @@ func monitorSuspendResume() { // also have their clock on "program time", and therefore // don't want or need this anyway. return + case _ERROR_INVALID_PARAMETERS: + // This is seen when running in Windows Docker. + // See issue 36557. + return default: println("runtime: PowerRegisterSuspendResumeNotification failed with errno=", ret) throw("runtime: PowerRegisterSuspendResumeNotification failure") |