qc.hlp (Table of Contents; Topic list)
system
 Summary Example                         Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     The system function passes <command> to the command interpreter,
     which executes the string as an operating-system command. Under
     OS/2, the command is executed synchronously. The system function
     refers to the COMSPEC and PATH environment variables that locate
     the command interpreter file: COMMAND.COM in DOS or CMD.EXE in
     OS/2. If <command> is a pointer to a NULL 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. Under OS/2, the
     system function returns the exit status from the command
     interpreter.
 
     A return value of -1 indicates an error, and errno is set to
     E2BIG, ENOENT, ENOEXEC, or ENOMEM.
                                    -♦-