Skip to content

Commit

Permalink
check process is running in more robust way
Browse files Browse the repository at this point in the history
  • Loading branch information
stou committed Dec 15, 2018
1 parent bcb5122 commit 140b721
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,7 @@ func (p *Process) getExitCodes() []int {
//
func (p *Process) isRunning() bool {
if p.cmd != nil && p.cmd.ProcessState != nil {
status := p.cmd.ProcessState.Sys().(syscall.WaitStatus)
if status.Continued() {
return true
}
return p.cmd.Process.Signal( syscall.Signal( 0 ) ) == nil
}
return false
}
Expand Down

0 comments on commit 140b721

Please sign in to comment.