github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/engine/pkg/pidfile/pidfile_unix.go (about) 1 //go:build !windows && !darwin 2 // +build !windows,!darwin 3 4 package pidfile // import "github.com/docker/docker/pkg/pidfile" 5 6 import ( 7 "os" 8 "path/filepath" 9 "strconv" 10 ) 11 12 func processExists(pid int) bool { 13 if _, err := os.Stat(filepath.Join("/proc", strconv.Itoa(pid))); err == nil { 14 return true 15 } 16 return false 17 }