github.com/docker/docker@v299999999.0.0-20200612211812-aaf470eca7b5+incompatible/pkg/pidfile/pidfile_darwin.go (about)

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