mirror of
https://github.com/adnanh/webhook.git
synced 2025-10-04 05:31:03 +00:00
17 lines
269 B
Go
17 lines
269 B
Go
//go:build !windows && !darwin
|
|
// +build !windows,!darwin
|
|
|
|
package pidfile
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"strconv"
|
|
)
|
|
|
|
func processExists(pid int) bool {
|
|
if _, err := os.Stat(filepath.Join("/proc", strconv.Itoa(pid))); err == nil {
|
|
return true
|
|
}
|
|
return false
|
|
}
|