System
Module | ejs.sys |
Definition | class System |
Inheritance | System Object |
Specified | ejscript-1.1 |
Stability | Prototype. |
System is a utility class providing methods to interact with the operating system.
Properties
Qualifiers | Property | Type | Description |
public static const | Bufsize | Number | |
public static get | hostname | String | The fully qualified system hostname. |
Inherited Properties
System Methods
Inherited Methods
Method Detail
Kill the specified process.
- Parameters
pid: Number | Process ID of the process to kill. |
signal: Number | If pid is greater than zero, the signal is sent to the process whoes ID is pid. If pid is zero, the process is tested but no signal is sent. [default: 2] |
- Returns
- True if successful.
- Throws
-
IOError: if the pid is invalid or if the requesting process does not have sufficient privilege to send the signal.
Execute a command/program.
- Parameters
cmd: String | Command or program to execute. |
- Returns
- A text stream connected to the programs standard output.
- Throws
-
IOError: if the command exits with non-zero status.