delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/05/12/04:02:23

From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
To: <djgpp-workers AT delorie DOT com>
Cc: <snowball3 AT bigfoot DOT com>, "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Subject: RE: spawn* and LFN again
Date: Sat, 12 May 2001 09:40:32 +0200
Message-ID: <CAEGKOHJKAAFPKOCLHDIOEDOCDAA.tim.van.holder@pandora.be>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <3395-Fri11May2001202542+0300-eliz@is.elta.co.il>
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal
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

> > > Then I think spawn*'s logic is better.  It doesn't make sense, IMHO,
> > > to find a program lfnexe.foo.exe, but fail to find lfnexe.foo.  If I
> > > replace the first dot with something else, as in lfnexe_foo, then both
> > > lfnexe_foo and lfnexe_foo.exe work.  That is, COMMAND.COM (at least on
> > lfnexe.foo.exe would actually work; (for example, for hello.world.exe,
> > both 'hello.world' and 'hello.world.exe' run the executable).
>
> Not for me, it doesn't: I just tried (on Windows 98).  If I type
> "hello.world [Enter]", it says "Bad command or file name".  Only
> hello.world.exe works.
>
> You did try it from COMMAND.COM, yes?
Ho hum. *blush* Err, nope.  I guess it was under 4DOS.  COMMAND.COM indeed
fails to run hello.world.  OK, in that case I think spawn should behave
like 4DOS.COM :-)

> > Basically, if I ask spawn to run <foo>, I expect it to run <foo> if it
> > exists, and try <foo>.exe if it doesn't
>
> That's not what COMMAND.COM does.  Try typing "foo" in a directory
> where both `foo' and `foo.exe' exist, and see who gets called.
That's only because it doesn't consider foo executable.  I should amend it
by saying it should try <foo> if it exists and is executable, and only try
<foo>.exe afterwards.

- Raw text -


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