// Sending a signal of 0 can be used to check the existence of a process.
iferr:=p.Signal(syscall.Signal(0));err==nil{
returnfmt.Errorf("something is not right...please stop all minikube instances, seemingly a hyperkit server is already running with pid %d",pid)
p,err:=ps.FindProcess(pid)
iferr!=nil{
returnerrors.Wrapf(err,"trying to find process for PID %s",pid)
}
machinePID:=d.getPid()
ifmachinePID!=pid{
returnfmt.Errorf("something is not right...the PID reported in %s (%d) is different from machine PID (%d from %s)",pidFile,pid,machinePID,machineFileName)
returnfmt.Errorf("something is not right...please stop all minikube instances, seemingly a hyperkit server is already running with pid %d, executable: %s",pid,p.Executable())
}
log.Warnf("No running process found with PID %d, removing %s...",machinePID,pidFile)
log.Infof("No running hyperkit process found with PID %d, removing %s...",pid,pidFile)