Module jls.lang.ProcessHandle
Represents a native process.
Class ProcessHandle
processHandle:getPid () | Returns the Process ID for this process. |
processHandle:isAlive () | Returns true if this process is alive. |
processHandle:ended () | Returns a promise that resolves once this process is terminated. |
processHandle:destroy () | Destroys this process. |
ProcessHandle.of (pid) | Returns a new ProcessHandle with the specified Process ID. |
ProcessHandle.getCurrentPid () | Returns the Process ID of the current process. |
ProcessHandle.getExecutablePath () | Returns the current executable path. |
Class ProcessHandle
A ProcessHandle class.
- processHandle:getPid ()
-
Returns the Process ID for this process.
Returns:
-
the Process ID for this process.
- processHandle:isAlive ()
- Returns true if this process is alive.
- processHandle:ended ()
-
Returns a promise that resolves once this process is terminated.
Returns:
-
jls.lang.Promise
a promise that resolves once this process is terminated.
- processHandle:destroy ()
- Destroys this process.
- ProcessHandle.of (pid)
-
Returns a new ProcessHandle with the specified Process ID.
Parameters:
- pid number the process identifier.
Returns:
-
a new ProcessHandle with the specified Process ID.
- ProcessHandle.getCurrentPid ()
-
Returns the Process ID of the current process.
Returns:
-
number
the Process ID of the current process.
- ProcessHandle.getExecutablePath ()
-
Returns the current executable path.
Returns:
-
string
the current executable path.