Skip to content

Process

Process . getPlatform ( )  -> OS

Returns the current OS thats being used

Returns

OS
Process . getArgs ( )  -> { string }

Returns the arguments passed into the current program

Returns

{ string }
Process . getEnv ( )  -> { [string]: string }

Returns the environment the current process is executing under

Returns

{
{ [string]: string } }
Process . getCwd ( )  -> string

Returns the current working directory for this process

Returns

string
Process . run ( exec args opts )  -> RunResult

Runs a subprocess and returns the result. Only supported on Zune; calling from Lune will raise an error explaining the requirement.

Parameters

exec: string
args: { string }?
opts: {
cwd: string?,
env: { [string],
}

Returns

RunResult
Process . getArch ( )  -> Arch

Returns the CPU architecture the current process is executing on

Returns

Arch
Process . onSignal ( signal callback )  -> ()

Registers a callback to be invoked when the process receives an OS signal (e.g. "INT" for SIGINT). Only supported on Zune; on Lune this is a no-op with a warning.

Parameters

signal: Signal
callback: () -> ()