service/example/runner: do not check ProcessState as it may be nil

Fixes #218
This commit is contained in:
Daniel Theophanes
2020-06-07 11:01:04 -07:00
parent 2ce04d92a6
commit 5544762d3e
+1 -1
View File
@@ -94,7 +94,7 @@ func (p *program) run() {
func (p *program) Stop(s service.Service) error {
close(p.exit)
logger.Info("Stopping ", p.DisplayName)
if p.cmd.ProcessState.Exited() == false {
if p.cmd.Process != nil {
p.cmd.Process.Kill()
}
if service.Interactive() {