service/example/runner: do not check ProcessState as it may be nil
Fixes #218
This commit is contained in:
@@ -94,7 +94,7 @@ func (p *program) run() {
|
|||||||
func (p *program) Stop(s service.Service) error {
|
func (p *program) Stop(s service.Service) error {
|
||||||
close(p.exit)
|
close(p.exit)
|
||||||
logger.Info("Stopping ", p.DisplayName)
|
logger.Info("Stopping ", p.DisplayName)
|
||||||
if p.cmd.ProcessState.Exited() == false {
|
if p.cmd.Process != nil {
|
||||||
p.cmd.Process.Kill()
|
p.cmd.Process.Kill()
|
||||||
}
|
}
|
||||||
if service.Interactive() {
|
if service.Interactive() {
|
||||||
|
|||||||
Reference in New Issue
Block a user