abla/process/supervisor
Generated from source.
Import with import "abla/process/supervisor".
Source: abla/process/supervisor/entry.ab
SupervisedProcess (class)
class SupervisedProcess(val identifier: int)
A process-group handle. A negative identifier indicates launch failure.
startSupervisedProcess (fun)
fun startSupervisedProcess(
directory: string,
arguments: array<string>,
environmentNames: array<string> = [],
environmentValues: array<string> = [],
outputPath: string = ""
): SupervisedProcess
Starts arguments in its own process group in directory. Pair environment names with values to override the inherited environment. An optional outputPath collects stdout and stderr together. A negative identifier indicates a launch failure.
SupervisedProcess.poll (extension fun)
fun SupervisedProcess.poll(): int
Returns -1 while the child is running, otherwise its conventional process exit status (including 128 + signal for signalled children).
SupervisedProcess.stop (extension fun)
fun SupervisedProcess.stop(graceMilliseconds: int = 100): int
Stops the process group, escalating from TERM to KILL after graceMilliseconds when needed. Returns the child's collected status or -1 on failure.
processMonotonicMilliseconds (fun)
fun processMonotonicMilliseconds(): int
Returns monotonic time in whole milliseconds, or zero on clock failure.
processProcessorCount (fun)
fun processProcessorCount(): int
Counts online CPUs using the system's CPU list. Returns 1 if the list yields no CPUs.
Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.