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.
Returns:
-
boolean
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