diff --git a/nonfree/nvidia-container-toolkit/nvidia-persistenced-wrapper/main.go b/nonfree/nvidia-container-toolkit/nvidia-persistenced-wrapper/main.go index f68f4389..7e4a72d2 100644 --- a/nonfree/nvidia-container-toolkit/nvidia-persistenced-wrapper/main.go +++ b/nonfree/nvidia-container-toolkit/nvidia-persistenced-wrapper/main.go @@ -1,6 +1,7 @@ package main import ( + "bytes" "errors" "io/ioutil" "log" @@ -70,6 +71,8 @@ func getProcessId() (int, error) { if err != nil { return 0, err } + // remove any newlines + pidData = bytes.TrimRight(pidData, "\n") pid, err := strconv.Atoi(string(pidData)) if err != nil { return 0, err