delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/03/10/08:41:06

X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
Date: Fri, 10 Mar 2000 14:09:29 +0100 (MET)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
X-Sender: broeker AT acp3bf
To: djgpp-workers AT delorie DOT com
Subject: Re: stat and X bit question
In-Reply-To: <38C7B153.28825.14E9DA@localhost>
Message-ID: <Pine.LNX.4.10.10003101403290.18156-100000@acp3bf>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 9 Mar 2000, Mark E. wrote:

> Greetings,
> In is_exec.c, there is a list of extensions (listed in the code snippet 
> below) that automatically designate executable files. This list doesn't 
> include .sh, .ksh, .pl, and .sed. Was this done on purpose or should they 
> indeed be added to the list?

They shouldn't, I think. To be directly executable, these types of
script just need the usual 

	#! /bin/sh

or equivalent perl or sed line, and they will automatically be flagged
executable, by the 'magic cookie' detection.

To cite the source comments on this:

     Unix-like shells, which have executable shell scripts
     without extensions and DON'T have "#!" as their FIRST
     TWO CHARACTERS, lose here.  Sorry, folks.  */

Anyway, how would you execute a .pl script? And should we *really*
build intelligence like this into the libc? The #! method is
a whole lot safer.

Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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