Mail Archives: djgpp-workers/2000/03/10/08:41:06
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 -