sys.eh

Various system functions More...

use "sys.eh"

Functions

def exec(prog: String, args: [String]);
def exec_wait(prog: String, args: [String]): Int;
def getenv(key: String): String;
def setenv(key: String, val: String);
def sleep(millis: Int);
def sys_property(key: String): String;

Description

This header contains various functions which do not fit in other headers.

Function details

def getenv(key: String): String;
Returns value of environment variable with given name. If variable is not defined then empty string "" is returned.

def setenv(key: String, val: String);
Sets new value to the environment variable with given name.

def sleep(millis: Int);
Causes process to sleep for the specified number of milliseconds.

def exec_wait(prog: String, args: [String]): Int;
Executes given command with given arguments as subprocess of this process. This function blocks until subprocess executes and returns exit code of that subprocess.

def exec(prog: String, args: [String]);
Executes given command with given arguments as subprocess of this process in separate thread. This function returns immediately after subprocess starts and its result are two processes running consequently.

def sys_property(key: String): String;
Returns system property for the specified key. Returns null if there is no system property for given key.