www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/07/07/02:37:28

Date: Sat, 07 Jul 2001 09:34:43 +0300
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: <7263-Sat07Jul2001093442+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com
In-reply-to: <3B45D2A6.11785.CA64A0@localhost> (snowball3@bigfoot.com)
Subject: Re: dosexec.c changes
References: <3B44DBB0 DOT 9188 DOT 1772CD AT localhost> (snowball3 AT bigfoot DOT com) <3B45D2A6 DOT 11785 DOT CA64A0 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: Fri, 6 Jul 2001 15:00:54 -0400
> 
> 9866 One common historical implementation is that the execl(), execv(), 
> execle( ), and execve() functions return an [ENOEXEC] error for any file not 
> recognizable as executable, including a shell script. When the execlp( ) and 
> execvp( ) functions encounter such a file, they assume the file to be a shell 
> script and invoke a known command interpreter to interpret such files. This 
> is now  required by IEEE Std 1003.1-200x. These implementations of execvp( ) 
> and execlp( ) only give the error in the rare case of a problem with the 
> command interpreterexecutable file.
> 
> I think this new requirement can be applied to djgpp by having script_exec 
> use SHELL for the program to run if it can't find a hash bang line.

script_exec already does that, except that it invokes command.com, not
the value of $SHELL.

Note that the Posix draft makes a distinction between execl, execv,
execle and execve on the one side, and execlp and execvp on the
other.  AFAICS, dosexec doesn't handle these cases (and their
respective spawn* brethren) differently.

- Raw text -


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