Exec
- Tags
- comp-arch
Is a system-call that allows you replace a running process image with a new process image. See exec. Warn: Exec isn't a reversible process. Once you exec you can't restore the previous program or its state afterwards.
Suffix | Description |
---|---|
e | Accepts an array of pointers to environment variables for the new process. |
l | Command line arguments are passed individually (as variadic arguments). |
p | Use the PATH environment variable to find the file to be executed. |
v | Command line arguments are passed as an array of strings (a string[]). |
Mnemonically exec is actually a family of functions all beginning with exec
and
suffixed with one of the flags in tbl:exec-sfx.
Note: If the information for a command is passed via an array the last element must
be followed by a NULL-element ((char *) NULL
) to terminate the array.