publish_unix.go 261 B

1234567891011
  1. //go:build darwin || linux || dragonfly || freebsd || netbsd || openbsd
  2. // +build darwin linux dragonfly freebsd netbsd openbsd
  3. package cmd
  4. import "syscall"
  5. func processExists(pid int) bool {
  6. err := syscall.Kill(pid, syscall.Signal(0))
  7. return err == nil
  8. }