SPAWNL(3)
π SPAWNL(3) π
okay bestie, this page is from SchilyΒ΄s LIBRARY FUNCTIONS and it's all about launching a command in a subsidiary process. group-chat summary: spawnl() is the βrun this with these args, then come back to meβ girlie. π«Ά
πΈ NAME πΈ
spawnl() β calls a command with specified arguments β¨
π¦ SYNOPSIS π¦
int spawnl(Sin,Sout,Serr,Command_Name,arg1...argn,NULL)
FILE *Sin, *Sout, *Serr;
char *Command_Name, *arg1...*argn;
π₯ DESCRIPTION π₯
okay so spawnl() causes the named command to be called in a subsidiary process with the given arguments. The last argument to spawnl() must be NULL to indicate the end of the list β that's the βok we're done with argsβ flag, periodt.
The streams Sin, Sout and Serr become stdin, stout, and stderr for the command. (Yes bestie, stout β that is literally what the page says, and I am not fixing the canon. π) The Command_Name may be an absolute or a relative pathname.
To locate the command, the working directory is searched first, then /bin. This is a property of fexecv(), which spawnl() calls. π
When the command finishes, spawnl() returns to the caller. no cap.
π RETURNS π
Returns 0 when successful. Otherwise, returns a non-zero value which could be:
- an error code from
fork()orfexecl(). the argument toexit()in theCommand_name. 1, if stopped by a control C (^C).2, if killed by another process.4, if suspended by any fault, raise, control Y^Yor by another process. (In this case,spawnl()kills the suspended process.)
π NOTES π
spawnl() just calls spawnv() with the address and length of the argument list. π
mwah π β signing off with Joerg Schilling, 2022/09/09, SPAWNL(3), from SchilyΒ΄s LIBRARY FUNCTIONS. periodt. π
π¦ where this page comes from
- opensuse-leap 16.0: libschily-devel-doc 2022.10.16-160000.2.2 Β· CDDL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms