aboutsummaryrefslogtreecommitdiffstats
path: root/modules/graceful/manager_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/graceful/manager_unix.go')
-rw-r--r--modules/graceful/manager_unix.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/graceful/manager_unix.go b/modules/graceful/manager_unix.go
index 6fbb2bda29..b22b7b5860 100644
--- a/modules/graceful/manager_unix.go
+++ b/modules/graceful/manager_unix.go
@@ -18,6 +18,7 @@ import (
"time"
"code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/process"
"code.gitea.io/gitea/modules/setting"
)
@@ -73,7 +74,7 @@ func (g *Manager) start(ctx context.Context) {
// Set the running state & handle signals
g.setState(stateRunning)
- go g.handleSignals(ctx)
+ go g.handleSignals(g.managerCtx)
// Handle clean up of unused provided listeners and delayed start-up
startupDone := make(chan struct{})
@@ -112,6 +113,9 @@ func (g *Manager) start(ctx context.Context) {
}
func (g *Manager) handleSignals(ctx context.Context) {
+ ctx, _, finished := process.GetManager().AddTypedContext(ctx, "Graceful: HandleSignals", process.SystemProcessType, true)
+ defer finished()
+
signalChannel := make(chan os.Signal, 1)
signal.Notify(