src/runtime/os_windows.go | 9 +++++++-- diff --git a/src/runtime/os_windows.go b/src/runtime/os_windows.go index a278dddc57840e15901ce1533e7dd52597e98e55..a477f474f1c6cfca0e5083adf15f6e05fd72fe45 100644 --- a/src/runtime/os_windows.go +++ b/src/runtime/os_windows.go @@ -262,8 +262,9 @@ } 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 @@ -300,6 +301,10 @@ case _ERROR_FILE_NOT_FOUND: // Systems without access to the suspend/resume notifier // 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)