C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
system
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The system function passes <command> to the command interpreter,
     which executes the string as an operating-system command. The
     system function refers to the COMSPEC and PATH environment
     variables that locate the command interpreter file: COMMAND.COM in
     DOS. If <command> is a pointer to an empty string, the function
     simply checks whether the command interpreter exists.
 
     Return Value
 
     If <command> is NULL and the command interpreter is found, the
     function returns a nonzero value. If the command interpreter is
     not found, it returns the value 0 and sets errno to ENOENT. If
     <command> is not NULL, the system function returns the value 0 if
     the command interpreter is successfully started.
 
     A return value of -1 indicates an error, and errno is set to
     E2BIG, ENOENT, ENOEXEC, or ENOMEM.
                                    -♦-