Contidos dentroLocalizar Mais DocumentaçãoDestaques de Recursos de Suporte | Fazer download desta apostila em PDF (3779 KB)
system(3C)Name | Synopsis | Description | Return Values | Errors | Usage | Attributes | See Also Name
Synopsis#include <stdlib.h> int system(const char *string); DescriptionThe system() function causes string to be given to the shell as input, as if string had been typed as a command at a terminal. The invoker waits until the shell has completed, then returns the exit status of the shell in the format specified by waitpid(3C). If string is a null pointer, system() checks if the shell exists and is executable. If the shell is available, system() returns a non-zero value; otherwise, it returns 0. The standard to which the caller conforms determines which shell is used. See standards(5). Return ValuesThe system() function executes vfork(2) to create a child process that in turn invokes one of the exec family of functions (see exec(2)) on the shell to execute string. If vfork() or the exec function fails, system() returns -1 and sets errno to indicate the error. Errors
The system() function fails if: UsageThe system() function manipulates the signal handlers for AttributesSee attributes(5) for descriptions of the following attributes:
See AlsoSunOS 5.10 Last Revised 18 Dec 2003Name | Synopsis | Description | Return Values | Errors | Usage | Attributes | See Also |
||||||