Mail Archives: djgpp/1998/11/24/03:20:23
On Mon, 23 Nov 1998, Scott Guilbeaux wrote:
> Here's a little program that will spawn another program
>
> #include <unistd.h>
>
> int main(void)
> {
> execlp("progname", "progname", "param1", "param2", "param3", 0);
> }
The `exec*' family of functions is not for spawning subsidiary
programs, it is for *replacing* the current program with another one.
In other words, after the call like above, the calling program will
never get control back!
The original poster didn't have that in mind when he asked his
question, I think.
- Raw text -