MCPcopy Index your code
hub / github.com/DarthSim/overmind / Stop

Method Stop

start/process.go:103–120  ·  view source on GitHub ↗
(keepAlive bool)

Source from the content-addressed store, hash-verified

101}
102
103func (p *process) Stop(keepAlive bool) {
104 p.canDieNow = keepAlive
105
106 if p.interrupted {
107 // Ok, we have tried once, time to go brutal
108 p.Kill(keepAlive)
109 return
110 }
111
112 if p.Running() {
113 p.output.WriteBoldLine(p, []byte("Interrupting..."))
114 if err := p.groupSignal(p.stopSignal); err != nil {
115 p.output.WriteErr(p, fmt.Errorf("Can't stop: %s", err))
116 }
117 }
118
119 p.interrupted = true
120}
121
122func (p *process) Kill(keepAlive bool) {
123 p.canDieNow = keepAlive

Callers 7

RestartMethod · 0.95
WaitMethod · 0.45
waitPidMethod · 0.45
observeMethod · 0.45
RunMethod · 0.45
stopCommandCenterMethod · 0.45
waitForExitMethod · 0.45

Calls 5

KillMethod · 0.95
RunningMethod · 0.95
groupSignalMethod · 0.95
WriteBoldLineMethod · 0.80
WriteErrMethod · 0.80

Tested by

no test coverage detected