Schily's LIBRARY FUNCTIONS SPAWNL(3)
spawnl() - calls a command with specified arguments
FILE *Sin, *Sout, *Serr;
char *Command_Name, *arg1...*argn;
spawnl() causes the named command to be called in a subsidi-
ary process with the given arguments. The last argument to
spawnl() must be NULL to indicate the end of the list. The
streams Sin, Sout and Serr become stdin, stout, and stderr
for the command. The Command_Name may be an absolute or a
relative pathname. To locate the command, the working direc-
tory is searched first, then /bin. This is a property of
fexecv(), which spawnl() calls.
When the command finishes, spawnl() returns to the caller.
Returns 0 when successful. Otherwise, returns a non-zero
value which could be:
an error code from fork() or fexecl(). the argument to
exit() in the Command_name.
1, if stopped by a control C (^C).
2, if killed by another process.
4, if suspended by any fault, raise, control Y ^Y or by
another process. (In this case, spawnl() kills the
spawnl() just calls spawnv() with the address and length of
the argument list.
Joerg Schilling Last change: 15. Juli 1988 1
Man(1) output converted with