aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/runtime/os_windows.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/runtime/os_windows.go b/src/runtime/os_windows.go
index 6897933e30..2cf81f61a9 100644
--- a/src/runtime/os_windows.go
+++ b/src/runtime/os_windows.go
@@ -263,8 +263,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
@@ -302,6 +303,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")