lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


"Robert Raschke" <rtrlists@googlemail.com> wrote:
> On 7/21/08, Thomas Lauer <thomas.lauer@virgin.net> wrote:
> > Actually, this seems to be an artifact of CMD.EXE and not so much a rule
> > in Windows. (Rules in Windows? Wonder what that means anyway;-)
> >
> > At least my command-line interpreter (the delectable JPSoft 4NT/Take
> > Command) as well as the Start menu Run... box execute both commands
> > above without problem. (Indeed, I'll take this opportunity to point
> > interested readers to the freeware version of the JPSoft CLI (called
> > TCC/LE) which beats CMD.EXE hands down in terms of features and
> > usability.)
> 
> Well, it's actually system() that gets invoked by os.execute(). And
> system() in turn goes and finds CMD.EXE to execute your command line.

Nope. Here, system() -- which is MSVCRT.DLL's system() -- calls whatever
happens to be in environment variable COMSPEC. In my case that's 4NT.

It's all a big muddle but I think it's safe to say that this "bug" is a
CMD.EXE bug. It doesn't happen with my setup.

> And, yes, I hate Windows too. Took me two days to figure out the weird
> quoting, for example.

Well, I wouldn't say I hate it. It's more an complex, if sometimes
annoying, computer game;-)

I like to think that Windows gets much more consistent once you get the
hang of how certain things hang together. Having said that, there are
still far too many inconsistencies.

> I guess if you want to use some other command interpreter on Windows,
> you'll need to write a wrapper function for that using _exec() et al.

It all depends on the system() implementation in the C runtime. These
dependencies are what makes much of Lua's runtime calls such a
minefield.

-- 
cheers  thomasl

web: http://thomaslauer.com/start