You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the search function doesn't actually test whether a process is alive or not. According to the docs for os.FindProcess(pid) this will never be nil on Unix systems even when a process doesn't exist.
On Unix systems, FindProcess always succeeds and returns a Process for the given pid, regardless of whether the process exists.
This was giving me issues on my Linux machine without this patch, so I have submitted a pull request to fix this. It complains I've not hit some checks or something. I've never submitted a PR to an open source project on any repository ever, so my apologies that I don't know what I am doing for that.
New search code for daemon_unix.go
func (d*Context) search() (daemon*os.Process, errerror) {
iflen(d.PidFileName) >0 {
varpidintifpid, err=ReadPidFile(d.PidFileName); err!=nil {
return
}
daemon, err=os.FindProcess(pid)
iferr==nil&&daemon!=nil {
// Truly check on Unix systems that the daemon is running// Daemon is not actually running if an error is receivedifdaemon.Signal(syscall.Signal(0)) !=nil {
daemon=nil
}
}
}
return
}
The text was updated successfully, but these errors were encountered:
I noticed that the search function doesn't actually test whether a process is alive or not. According to the docs for
os.FindProcess(pid)
this will never be nil on Unix systems even when a process doesn't exist.This was giving me issues on my Linux machine without this patch, so I have submitted a pull request to fix this. It complains I've not hit some checks or something. I've never submitted a PR to an open source project on any repository ever, so my apologies that I don't know what I am doing for that.
New search code for
daemon_unix.go
The text was updated successfully, but these errors were encountered: