Date: Sun, 10 May 1998 11:48:53 +0300 (IDT) From: Eli Zaretskii To: leetonks AT hotmail DOT com cc: djgpp AT delorie DOT com Subject: Re: DJGPP 2.01 spawnvp problem...... In-Reply-To: <6iud0u$h33$1@nnrp1.dejanews.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Fri, 8 May 1998 leetonks AT hotmail DOT com wrote: > > Did you remember to make prog the first element of par as well? This is > > by far the most frequent problem with using spawnXX functions. > > I did, yes. Although I didn't at first - it was never mentioned in the info > for the spawn series of commands Are you sure you don't use some ancient version of the libc reference? The file libc.inf from DJGPP v2.01 release says this under "spawn*": Description ----------- These functions run other programs. The PATH points to the program to run. The extension is optional--if not given, and PATH is not found neither in the current directly nor along the `PATH', the extensions `.com', `.exe', `.bat', `.btm', `.sh', and `.ksh' are checked. And then the Example section has this: char *environ[] = { "PATH=c:\\dos;c:\\djgpp;c:\\usr\\local\\bin", "DJGPP=c:/djgpp", 0 }; char *args[] = { "gcc", "-v", "hello.c", 0 }; spawnvpe(P_WAIT, "gcc", args, environ); Which both shows that "gcc" should be passed in the second argument, and that the args[] array should be NULL-terminated. The text also says that the list of arguments should be terminated by a zero. So the docs seems to be okay here. > Again, this isn't mentioned in the docs. Any other shortcomings I should know > about? ;-) Well, I don't even see these shortcomings in the last version of the documentation ;-).