1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

httpapi: don't create a pidfile if it isn't set in the configuration

This commit is contained in:
Solomon Hykes 2013-10-27 06:51:43 +00:00
parent 958b4a8757
commit 7b17d55599

View file

@ -44,9 +44,12 @@ func jobInitApi(job *engine.Job) string {
if err != nil { if err != nil {
return err.Error() return err.Error()
} }
if srv.runtime.config.Pidfile != "" {
job.Logf("Creating pidfile")
if err := utils.CreatePidFile(srv.runtime.config.Pidfile); err != nil { if err := utils.CreatePidFile(srv.runtime.config.Pidfile); err != nil {
log.Fatal(err) log.Fatal(err)
} }
}
c := make(chan os.Signal, 1) c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, os.Kill, os.Signal(syscall.SIGTERM)) signal.Notify(c, os.Interrupt, os.Kill, os.Signal(syscall.SIGTERM))
go func() { go func() {