Oberon || Library || Module Index || Search Engine || Definition || Module


Ulm's Oberon Library:
UnixShell


NAME

UnixShell - pass a command to the system shell

SYNOPSIS

PROCEDURE Command(cmd: ARRAY OF CHAR;
                  VAR status: SysProcess.Status;
                  errors: RelatedEvents.Object) : BOOLEAN;

DESCRIPTION

Command passes cmd to the system shell (usually /bin/sh) for execution and blocks the invoking task until its completion. TRUE will be returned and the exit status of the shell is to be found in status (see SysProcess) if Command was able to create a subprocess. SysSignals.INT and SysSignals.QUIT will be ignored during command execution.

DIAGNOSTICS

Command returns FALSE and passes error events to errors if it is unable to create a new process (see SysProcess). An exit code of 127 may result from the inability to invoke the system shell.

SEE ALSO

SysProcess
exit status
UnixPipes
reading or feeding from/to a UNIX command

BUGS

There is no provision to distinguish a successful command execution with exit code 127 from the inability to invoke the system shell.

Command does not close any file descriptors. This causes the detection of closed pipes that were open at the invocation time to be postponed until the command is completed.


Edited by: borchert, last change: 1999/12/08, revision: 1.1, converted to HTML: 1999/12/08

Oberon || Library || Module Index || Search Engine || Definition || Module