diff --git a/pidfile.go b/pidfile.go index dd667a8..337a6ef 100644 --- a/pidfile.go +++ b/pidfile.go @@ -33,7 +33,7 @@ func getPidProcess(path string) (*os.Process, error) { func checkPidFileAlreadyExists(path string) error { if pidString, err := ioutil.ReadFile(path); err == nil { - if pid, err := strconv.Atoi(string(pidString)); err == nil { + if _, err := strconv.Atoi(string(pidString)); err == nil { if _, err := os.Stat(filepath.Join("/proc", string(pid))); err == nil { return fmt.Errorf("pid process is running") }