delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/05/09/07:03:56

Date: Wed, 9 May 2001 13:50:54 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Mark E." <snowball3 AT bigfoot DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: spawn* and LFN again
In-Reply-To: <3AF8337A.4152.2ADA56@localhost>
Message-ID: <Pine.SUN.3.91.1010509135013.19857c-100000@is>
MIME-Version: 1.0
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

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019