EXECV - execute another command.

(Slightly different from UNIX function)


status = execv( name, argv );


char *name;
is a string containing the name of the command to be executed. If this argument is NULL, argv[0] is used instead.
char **argv;
is a list of strings giving the arguments for the command. The list must be terminated by a NULL pointer.
int status;
is the status of the call if it failed. If the call succeeds, the current program has been terminated; thus there is never a successful return status.


"execv" terminates the current program and starts up the given command instead.


The use of non-printable characters in "name" or elements of "argv" is non-portable; in particular, on the DPS-8 the presence of slew characters (new-line, carriage return, formfeed, or vertical tab) will cause the string to be interpreted as several commands, separated by the slew characters.

The distinction between elements of "argv" may be lost if the argument strings contain white space or other characters which are special to the system's command line parsing.

Possible Errors:

The argument list was too big.

See Also:

expl nsc lib errno

Copyright © 1996, Thinkage Ltd.