SYSTEM(S) XENIX System V SYSTEM(S)
Name
system - Executes a shell command.
Syntax
#include <stdio.h>
int system (string)
char *string;
Description
system causes the string to be given to sh(C) as input as if
the string had been typed as a command at a terminal. The
current process waits until the shell has completed, then
returns the exit status of the shell.
Return Value
Errors, such as syntax errors, cause a non-zero return value
and execution of the command file is abandoned. Otherwise,
the exit status of the last command executed is returned.
See Also
sh(C), exec(S)
Diagnostics
system stops if it can't execute sh(C).
Page 1 (printed 8/7/87)