mirror of
https://github.com/rclone/rclone.git
synced 2024-12-27 01:19:12 +01:00
17 lines
234 B
Go
17 lines
234 B
Go
|
// +build !windows,!darwin
|
||
|
|
||
|
package pid
|
||
|
|
||
|
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
|
||
|
}
|