Skip to content

Commit

Permalink
Merge pull request #14 from bfgray3/killport
Browse files Browse the repository at this point in the history
  • Loading branch information
savannahostrowski committed May 11, 2023
2 parents 5670227 + 193fa8e commit fa0739f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,13 @@ func getProcesses() []list.Item {
}

func killPort(pid string) {
var err error
pidInt, err := strconv.Atoi(pid)
if err != nil {
log.Error("Could not convert to process pid to int")
return
}
syscall.Kill(pidInt, syscall.SIGKILL)
err = syscall.Kill(pidInt, syscall.SIGKILL)
if err != nil {
log.Error("Could not kill process")
}
Expand Down

0 comments on commit fa0739f

Please sign in to comment.