delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/03/10/13:40:40

From: Nate Eldredge <neldredge AT hmc DOT edu>
MIME-Version: 1.0
Message-ID: <14537.15544.788027.872103@mercury.st.hmc.edu>
Date: Fri, 10 Mar 2000 10:19:36 -0800 (PST)
To: djgpp-workers AT delorie DOT com
Subject: Re: stat and X bit question
In-Reply-To: <200003101744.MAA22072@indy.delorie.com>
References: <38C7B153 DOT 28825 DOT 14E9DA AT localhost>
<200003101744 DOT MAA22072 AT indy DOT delorie DOT com>
X-Mailer: VM 6.75 under Emacs 20.5.1
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

Eli Zaretskii writes:
 > 
 > > 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?
 > 
 > This list is there to avoid the costly operation of opening the file
 > and reading its first two bytes; files with other extensions will be
 > read and their executability determined by the magic signature.  So
 > the list only includes extensions you see most frequently on a typical
 > DOS/Windows system.
 > 
 > If somebody thinks that a few more extensions should be added, I don't
 > mind, but please remember the downside: the risk to identify
 > non-executable files as being executable, just because some Windows
 > application decided to usurp one of these extensions.

In particular, I've seen .pl used for Prolog source files.  Not on
Windows, admittedly, but...

-- 

Nate Eldredge
neldredge AT hmc DOT edu

- Raw text -


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