Date: Wed, 9 May 2001 13:50:54 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "Mark E." cc: djgpp-workers AT delorie DOT com Subject: Re: spawn* and LFN again In-Reply-To: <3AF8337A.4152.2ADA56@localhost> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 8 May 2001, Mark E. wrote: > >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. What happens with lfnexe.bat.exe or lfnexe.foo.exe? In general, we do try to emulate command.com, but we also try to correct some of its bugs. To me, the way spawn works seems more consistent, but if there's something that is broken by spawn's logic, then let's discuss that.