www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/02/09/03:43:22

Date: Fri, 09 Feb 2001 10:42:07 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Mark E." <snowball3 AT bigfoot DOT com>
Message-Id: <3791-Fri09Feb2001104207+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: djgpp-workers AT delorie DOT com
In-reply-to: <3A82A9FD.48.939B45@localhost> (snowball3@bigfoot.com)
Subject: Re: dosexec.c changes
References: <3A82A9FD DOT 48 DOT 939B45 AT localhost>
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

> From: "Mark E." <snowball3 AT bigfoot DOT com>
> Date: Thu, 8 Feb 2001 14:15:25 -0500
> 
> This fixes several problems found in dosexec.c.

Thanks.

> *************** int __spawnve(int mode, const char *path
> *** 1359,1384 ****
>     
>     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;
> !       }
>     }
>     if (!found)
>     {
> --- 1367,1375 ----
>     
>     if (!found)
>     {
> !     i = (rd) ? INTERP_OTHER_EXT : INTERP_NO_EXT;
> !     if (access(rpath, F_OK) == 0 && !(is_dir = (access(rpath, D_OK) == 0)))
> !       found = 1;
>     }
>     if (!found)
>     {

This removes a chunk of code that was supposed to run files with one
of the known extensions, such as .com, .bat, .sh, etc. if they are
found in the current directory.  For example, if the user invoked
"foo.bat", dosexec would call __dosexec_command_exec to run it.  The
new code seems to funnel them all through script_exec.  Did I miss
something?

When I asked for the files to go through script_exec, I meant only
those whose extensions are not part of the interpreters[] array.
Sorry if I was unclear.

- Raw text -


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