Parcourir la source

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

Windows: Write fatal error to event log if running as service
Vincent Demeester il y a 8 ans
Parent
commit
6997182882
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  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.
 func notifyShutdown(err error) {
 	if service != nil {
+		if err != nil {
+			logrus.Fatal(err)
+		}
 		service.stopped(err)
 	}
 }