/*++ /* NAME /* spawn_command 3 /* SUMMARY /* run external command /* SYNOPSIS /* #include <spawn_command.h> /* /* WAIT_STATUS_T spawn_command(key, ...) /* int key; /* AUXILIARY FUNCTIONS /* get_spawn_args( /* struct spawn_args *args, /* int key, /* va_list ap) /* DESCRIPTION /* spawn_command() runs a command in a child process and returns /* the command exit status. /* /* Arguments: /* .IP key /* spawn_command() takes a list of macros with arguments, /* terminated by CA_SPAWN_CMD_END which has no arguments. The /* following is a listing of macros and expected argument /* types. /* .RS /* .IP "CA_SPAWN_CMD_COMMAND(const char *)" /* Specifies the command to execute as a string. The string is /* passed to the shell when it contains shell meta characters /* or when it appears to be a shell built-in command, otherwise /* the command is executed without invoking a shell. /* One of CA_SPAWN_CMD_COMMAND or CA_SPAWN_CMD_ARGV must be specified. /* See also the SPAWN_CMD_SHELL attribute below. /* .IP "CA_SPAWN_CMD_ARGV(char **)" /* The command is specified as an argument vector. This vector is /* passed without further inspection to the \fIexecvp\fR() routine. /* One of CA_SPAWN_CMD_COMMAND or CA_SPAWN_CMD_ARGV must be specified. /* .IP "CA_SPAWN_CMD_ENV(char **)" /* Additional environment information, in the form of a null-terminated /* list of name, value, name, value, ... elements. By default only the /* command search path is initialized to _PATH_DEFPATH. /* .IP "CA_SPAWN_CMD_EXPORT(char **)" /* Null-terminated array of names of environment parameters that can /* be exported. By default, everything is exported. /* .IP "CA_SPAWN_CMD_STDIN(int)" /* .IP "CA_SPAWN_CMD_STDOUT(int)" /* .IP "CA_SPAWN_CMD_STDERR(int)" /* Each of these specifies I/O redirection of one of the standard file /* descriptors for the command. /* .IP "CA_SPAWN_CMD_UID(uid_t)" /* The user ID to execute the command as. The value -1 is reserved /* and cannot be specified. /* .IP "CA_SPAWN_CMD_GID(gid_t)" /* The group ID to execute the command as. The value -1 is reserved /* and cannot be specified. /* .IP "CA_SPAWN_CMD_TIME_LIMIT(int)" /* The amount of time in seconds the command is allowed to run before /* it is terminated with SIGKILL. The default is no time limit. /* .IP "CA_SPAWN_CMD_SHELL(const char *)" /* The shell to use when executing the command specified with /* CA_SPAWN_CMD_COMMAND. This shell is invoked regardless of the /* command content. /* .RE /* DIAGNOSTICS /* Panic: interface violations (for example, a missing command). /* /* Fatal error: fork() failure, other system call failures. /* /* spawn_command() returns the exit status as defined by wait(2). /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* SEE ALSO /* exec_command(3) execute command /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.