mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-25 19:43:22 +00:00
Fix finding pid of a process
This commit is contained in:
parent
0866c377e9
commit
7061ba20bb
@ -357,7 +357,7 @@ func isProcessRunningInHost(pid int) (bool, error) {
|
||||
}
|
||||
|
||||
func getPidsForProcess(name string) ([]int, error) {
|
||||
out, err := exec.Command("pidof", "name").Output()
|
||||
out, err := exec.Command("pidof", name).Output()
|
||||
if err != nil {
|
||||
return []int{}, fmt.Errorf("failed to find pid of %q: %v", name, err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user