delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/02/07/17:33:42

From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Wed, 7 Feb 2001 17:18:39 -0500
MIME-Version: 1.0
Subject: Re: Probably a bug in bash 2.04
Message-ID: <3A81836F.22564.961DF@localhost>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp-workers AT delorie DOT com

> It seems that when LFN=N only programs that end in .exe, .bat, .etc can be 
> run.
> 

I've dug a little deeper into the problem. If you try to run 'foo.sub' when 
LFN=N, __spawnve will look for 'foo.exe', 'foo.bat', etc. and not run 
'foo.sub'. This makes no sense. Why does it do this?

(this behavior is from dosexec.c:__spawnve reproduced below)

  if (!found)
  {
    const char *rpath_ext;

    if (rd)
    {
      i = 0;
      rpath_ext = rd;
    }
    else
    {
      i = INTERP_NO_EXT;
      rpath_ext = "";
    }
    for ( ; interpreters[i].extension; i++)
      if (stricmp(rpath_ext, interpreters[i].extension) == 0
	  && access(rpath, F_OK) == 0
	  && !(is_dir = (access(rpath, D_OK) == 0)))
      {
	found = 1;
        break;
      }
  }




- Raw text -


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