INNER CODE UNIT · Go

sdNotify

Mirantis/cri-dockerd · backend/daemon_unix.go:42

func sdNotify(state string) error {
	_, err := daemon.SdNotify(false, state)
	if err != nil {
		//TODO: log the notification error
		return err
	}
	return nil
}

func handleNotify() {
	sdNotify(daemon.SdNotifyReady)
	sigs := make(chan os.Signal, 1)
	signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
	go func() {
		<-sigs
		sdNotify(daemon.SdNotifyStopping)
	}()
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…