mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-19 16:51:01 -04:00
8e5eba8735
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
16 lines
238 B
Go
16 lines
238 B
Go
// +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
|
|
}
|