EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Perl scripts: eval exec instead of shebang - why?
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Mon, 10 Sep 2018 15:53:36 -0500
Hi Martin,

On 09/10/2018 03:24 PM, Konrad, Martin wrote:
> Looking at the Perl scripts included in EPICS Base I'm wondering if it
> is really necessary to start some of them (see for example [1]) with the
> rather esoteric
> 
> eval 'exec perl -S $0 ${1+"$@"}'  # -*- Mode: perl -*-
>     if $running_under_some_shell;
> 
> rather than the usual "#!/usr/bin/perl" or "#!/usr/bin/env perl" (please
> refer to [2] for an explanation of the existing "eval exec" solution).

The makeInstallDir.pl script in softIoc appears to be the last one that
actually uses that construct. I remember replacing the others a while
back, and there is no reason I know of for not fixing that one as well,
I just missed it at the time (we didn't have 'git grep' back then, which
is a wonderful thing...).

> According to my understanding all Unix systems should understand the
> shebang. Windows doesn't care (it looks at the file name extension). Can
> the experts for non-Unix systems shine some light on why this is needed?

We only support building EPICS on Windows or Unix-like OS hosts, so this
has nothing to do with non-Unix targets.

Fixing on the 3.14 branch, will be merged up after the 3.14.12.8 final
release.

- Andrew

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

References:
Perl scripts: eval exec instead of shebang - why? Konrad, Martin

Navigate by Date:
Prev: Perl scripts: eval exec instead of shebang - why? Konrad, Martin
Next: Re: Perl scripts: eval exec instead of shebang - why? Konrad, Martin
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Perl scripts: eval exec instead of shebang - why? Konrad, Martin
Next: Re: Perl scripts: eval exec instead of shebang - why? Konrad, Martin
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 10 Sep 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·