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:
parent
958b4a8757
commit
7b17d55599
1 changed files with 5 additions and 2 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue