Mail Archives: djgpp/1996/08/04/02:19:21
On Thu, 1 Aug 1996, Nissim Chudnoff wrote:
> Could anyone give me an example of spawnl()'s use? I can't seem to get it
> to do anything, even though I have succesfully compiled some test prgms
> using it...
The example in the libc reference is correct, except that it leaves out
the first argument:
char *environ[] = {
"PATH=c:\\dos;c:\\djgpp;c:\\usr\\local\\bin",
"DJGPP=c:/djgpp",
0
};
char *args[] = {
"gcc",
"-v",
"hello.c",
0
};
spawnvpe("gcc", args, environ);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The last line should have said this:
spawnvpe(P_WAIT, "gcc", args, environ);
- Raw text -