Process
Summary
Functions
Process.getPlatform() → OSProcess.getArgs() → { string }Process.getEnv() → { [string]: string }Process.getCwd() → stringProcess.run(exec: string, args: { string }?, opts: { cwd: string?, env: { [string]: string }? }?) → RunResultProcess.getArch() → ArchProcess.onSignal(signal: Signal, callback: () -> ())Functions
Section titled “Functions”getPlatform
Section titled “getPlatform”Process . getPlatform ( ) -> OS
Returns the current OS thats being used
Returns
| OS |
getArgs
Section titled “getArgs”Process . getArgs ( ) -> { string }
Returns the arguments passed into the current program
Returns
| { string } |
getEnv
Section titled “getEnv”Process . getEnv ( ) -> { [string]: string }
Returns the environment the current process is executing under
Returns
| { { [string]: string } } |
getCwd
Section titled “getCwd”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 |
getArch
Section titled “getArch”Process . getArch ( ) -> Arch
Returns the CPU architecture the current process is executing on
Returns
| Arch |
onSignal
Section titled “onSignal”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: () -> () |