From: "Mark E." To: djgpp-workers AT delorie DOT com Date: Tue, 8 May 2001 17:57:14 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: spawn* and LFN again Message-ID: <3AF8337A.4152.2ADA56@localhost> X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp-workers AT delorie DOT com Hi guys, Is the extension search in dosexec.c:__spawnve() supposed to emulate how command.com finds extensions? If so, I've found a difference in the emulation. I tested command.com (win98se's version) with the following short program: lfnexe.c: #include int main(int argc, char **argv) { printf ("argv0: %s\n", argv[0]); return 0; } then gcc -o lfntest.exe lfntest.c Then make a slight alteration to make lfntest2.c: #include int main(int argc, char **argv) { printf ("lfnexe.exe.exe argv0: %s\n", argv[0]); return 0; } Then compile: gcc -o lfntest.exe lfntest.c gcc -o lfntest.exe.exe lfntest2.c Results from the command line: >lfnexe argv0: d:/djgpp/projects/lfnexe/lfnexe.exe >lfnexe.exe argv0: d:/djgpp/projects/lfnexe/lfnexe.exe >lfnexe.exe.exe lfnexe.exe.exe argv0: d:/djgp/pprojects/lfnexe/lfnexe~1.exe But spawn finds 'lfnexe.exe.exe' when given 'lfnexe.exe': #include #include int main() { spawnl (P_WAIT, "lfnexe", "lfnexe", NULL); spawnl (P_WAIT, "lfnexe.exe", "lfnexe.exe", NULL); spawnl (P_WAIT, "lfnexe.exe.exe", "lfnexe.exe.exe", NULL); return 0; } It's output: argv0: lfnexe.exe lfnexe.exe.exe argv0: lfnexe.exe.exe lfnexe.exe.exe argv0: lfnexe.exe.exe If DJGPP is emulating command.com behavior, then the case lfnexe.exe.exe is executed when given lfnexe.exe needs to be fixed.