gopkg.in/docker/docker.v20@v20.10.27/pkg/pidfile/pidfile_darwin.go (about) 1 //go:build darwin 2 // +build darwin 3 4 package pidfile // import "github.com/docker/docker/pkg/pidfile" 5 6 import ( 7 "golang.org/x/sys/unix" 8 ) 9 10 func processExists(pid int) bool { 11 // OS X does not have a proc filesystem. 12 // Use kill -0 pid to judge if the process exists. 13 err := unix.Kill(pid, 0) 14 return err == nil 15 }