1
0
Fork 0
forked from forgejo/forgejo

Graceful fixes (#8645)

* Only attempt to kill parent once

* Apply suggestions from code review

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Add waitgroup for running servers
This commit is contained in:
zeripath 2019-10-23 16:32:19 +01:00 committed by GitHub
parent 7d1a7c05db
commit f067e12859
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 35 additions and 7 deletions

View file

@ -48,7 +48,7 @@ func (srv *Server) handleSignals() {
if setting.GracefulRestartable {
log.Info("PID: %d. Received SIGHUP. Forking...", pid)
err := srv.fork()
if err != nil {
if err != nil && err.Error() != "another process already forked. Ignoring this one" {
log.Error("Error whilst forking from PID: %d : %v", pid, err)
}
} else {