SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST

# OS:ProcessManagement

This is a subset of the ``Process Management`' section of Python's ``os`' package. If you want to add to this module, use the Python function signature and add a parameter ``res`' instead of raising an exception.

### Import List

        C
        OS:Path

Procedure Summary
ExitStatus(int): int Returns the exit status for the command executed by ``system()`'.
TermSignal(int): int Returns the termination signal for the command executed by ``system()`'.
system(STRING): int Executes the command in a subshell.

Procedure Detail

### ExitStatus

    PROCEDURE ExitStatus(status: int): int

> Returns the exit status for the command executed by ``system()`'. If the process terminated abnormally (eg. due to a signal), the value -1 is returned.

### TermSignal

    PROCEDURE TermSignal(status: int): int

> Returns the termination signal for the command executed by ``system()`'. If the process terminated normally, the value -1 is returned.

### system

    PROCEDURE system(command: STRING): int

> Executes the command in a subshell. This is implemented by calling the Standard C function ``system()`', and has the same limitations. The return value is the exit status of the process encoded in the format specified for ``wait()`'. Note that POSIX does not specify the meaning of the return value of the C ``system()`' function, so the return value of this Oberon-2 function is system-dependent.

> Path.Encode is used to calculate the character array that is passed to the OS.