rclone/vendor/github.com/pengsrc/go-shared/pid/pidfile_unix.go

17 lines
234 B
Go
Raw Normal View History

// +build !windows,!darwin
package pid
import (
"os"
"path/filepath"
"strconv"
)
func processExists(pid int) bool {
if _, err := os.Stat(filepath.Join("/proc", strconv.Itoa(pid))); err == nil {
return true
}
return false
}