github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/engine/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 }