From: Daniel Burrows <dburrows@de...> - 2001-10-23 13:26:44
On Tue, Oct 23, 2001 at 07:05:09AM -0400, Felipe Bergo <bergo@...> was heard to say:
> > Also, rather than forcing the script path to be
> > $HOME/.eboard/scripts/%s, it might make more sense to just add that
> > directory to $PATH, and let it be found by execvp. This way, scripts
> > could be shared in the normal system path as well.
> And makes them non-enumerable too. (think distant, remote PATH elements on
> grungy, lossy, slow NFS volumes, think "find" running over them. When I
> was an undergrad, I had to wait 3 days for a "find" to complete the
> enumeration of binaries in the regular PATH of one of the Solaris
I'm not aware of any reasonable system where exec() fails on scripts.
However, you might want to look at the AC_SYS_INTERPRETER autoconf macro
(and maybe look at how, eg, bash handles this):
- Macro: AC_SYS_INTERPRETER
Check whether the system supports starting scripts with a line of
the form `#! /bin/csh' to select the interpreter to use for the
script. After running this macro, shell code in `configure.ac'
can check the shell variable `interpval'; it will be set to `yes'
if the system supports `#!', `no' if not.
/-------------------- Daniel Burrows <dburrows@...> -------------------\
| Whoever created the human body left in a fairly basic |
| design flaw. It has a tendency to bend at the knees. |
| -- Terry Pratchett, _Men at Arms_ |
\----------------- The Turtle Moves! -- http://www.lspace.org ----------------/
Get latest updates about Open Source Projects, Conferences and News.