SYSTEM - execute another command.

(ANSI Standard)


#include <stdlib.h>
status = system( command )


const char *command;
is a string containing a command that should be submitted to the operating system. This should not have a '\n' on the end.
int status;
is the status returned by the operating system when the command finishes execution.


"system" submits a string to the operating system as if the string was typed as a command at the terminal. The current program will be suspended until the invoked command finishes.

Note that "system" automatically places a '\n' on the end of the command string.


The use of non-printable characters in 'command' is non-portable; in particular, on the DPS8 the presence of slew characters (new-line, carriage return, formfeed, or vertical tab) will cause the string to be interpreted as several commands, separated by the slew characters.

The status returned by the operating system is obviously system dependent.

See Also:

expl b lib system
for information on how the status value is constructed.

Copyright © 1996, Thinkage Ltd.