Merge remote-tracking branch 'origin/torrc' into windows_build
the build failed Details

This commit is contained in:
Dan Ballard 2020-10-20 13:10:36 -07:00
commit 582e746795
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ func CheckProcessAndKill(pid uint64, processName string) {
// process.exe <PID> Services 0 8,936 K
lines := strings.Split(string(bytes),"\n")
// check for "<process>.exe"
if len(lines) >= 3 && strings.HasPrefix(strings.ToLower(strings.Trim(lines[2])),processName+".exe") {
if len(lines) >= 3 && strings.HasPrefix(strings.ToLower(strings.TrimSpace(lines[2])),processName+".exe") {
Kill(pid)
return
}
@ -43,4 +43,4 @@ func Kill(pid uint64) {
log.Debugf("could not kill pid: %v %v", pid, err)
}
return
}
}