ntfy/cmd/publish_unix.go

12 lines
261 B
Go
Raw Permalink Normal View History

2022-08-31 21:49:08 +00:00
//go:build darwin || linux || dragonfly || freebsd || netbsd || openbsd
2022-08-31 20:26:43 +00:00
// +build darwin linux dragonfly freebsd netbsd openbsd
2022-06-20 14:56:45 +00:00
package cmd
import "syscall"
func processExists(pid int) bool {
err := syscall.Kill(pid, syscall.Signal(0))
return err == nil
}