public class ProcessUtils extends Object
| Constructor and Description |
|---|
ProcessUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getPid(int fallback)
Tries to get the PID of the current process caching it for future calls
since it won't change throughout the life of the process
|
static boolean |
isAlive(int pid)
Determines whether a given PID is alive
|
static boolean |
negativePidsTreatedAsAlive()
Gets whether the platform we are running on will cause us to treat
negative (i.e.
|
public static int getPid(int fallback)
fallback - Fallback PID to return if unable to determine the PID i.e. an
error code to returnfallback if unable to
determine PIDpublic static boolean isAlive(int pid)
pid - PIDpublic static boolean negativePidsTreatedAsAlive()
Licensed under the Apache License, Version 2.0