aboutsummaryrefslogtreecommitdiffstats
path: root/util/process.go
diff options
context:
space:
mode:
Diffstat (limited to 'util/process.go')
-rw-r--r--util/process.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/util/process.go b/util/process.go
deleted file mode 100644
index ddd3f704..00000000
--- a/util/process.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package util
-
-import (
- "os"
- "syscall"
-)
-
-// ProcessIsRunning tell is a process is running
-func ProcessIsRunning(pid int) bool {
- // never return no error in a unix system
- process, err := os.FindProcess(pid)
-
- if err != nil {
- return false
- }
-
- // Signal 0 doesn't do anything but allow testing the process
- err = process.Signal(syscall.Signal(0))
-
- // Todo: distinguish "you don't have access" and "process doesn't exist"
-
- return err == nil
-}