Ver Fonte

Merge pull request #26725 from StefanScherer/log-error-to-event-log

Windows: Write fatal error to event log if running as service
Vincent Demeester há 8 anos atrás
pai
commit
6997182882
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      cmd/dockerd/daemon_windows.go

+ 3 - 0
cmd/dockerd/daemon_windows.go

@@ -41,6 +41,9 @@ func notifySystem() {
 // notifyShutdown is called after the daemon shuts down but before the process exits.
 // notifyShutdown is called after the daemon shuts down but before the process exits.
 func notifyShutdown(err error) {
 func notifyShutdown(err error) {
 	if service != nil {
 	if service != nil {
+		if err != nil {
+			logrus.Fatal(err)
+		}
 		service.stopped(err)
 		service.stopped(err)
 	}
 	}
 }
 }