The system function

Name

system -- 

Synopsis

#include <stdlib.h>

int system (const char *string);

Description

The system function passes the string pointed to by string to the host environment to be executed by a command processor in an implementation-defined manner. A null pointer may be used for string to inquire whether a command processor exists.

Returns

If the argument is a null pointer, the system function returns nonzero only if a command processor is available. If the argument is not a null pointer, the system function returns an implementation-defined value.

Implementation Notes

There is no command processor.
If the argument is a null pointer, then zero is returned to indicate that a command processor is not available.
If the argument is not a null pointer, the system function returns -1, and errno is set to ENOSYS.