Date: Tue, 7 Dec 93 10:43:24 -0500 From: DJ Delorie To: flaregun AT strauss DOT udel DOT edu Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Symbolic links and functionality [ was: O_BINARY ] > #include > void main(int argc, char *argv[]) > { > execv("DOIT.EXE", argv[]); /* or another flavor of exec() */ > } > > DOIT.EXE will see that argv[0] = "DODAT.EXE", won't it? This seems to No. argv[0] is *always* set from the program name in MS-DOS, regardless of what you pass for exec*. DJGPP bypasses MS-DOS in order to provide this functionality, so if you were using a djgpp program to call another djgpp program (via exec*), the argv array is passed intact. Note, however, that it's much more efficient to use the symbolic link mechanism that djgpp provides instead.