Mail Archives: djgpp-workers/2001/05/09/07:03:56
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 <stdio.h>
> #include <process.h>
>
> 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.
- Raw text -