bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Explicit interpreter paths considered harmful


From: Jim Meyering
Subject: Re: Explicit interpreter paths considered harmful
Date: Fri, 30 Oct 2009 13:29:51 +0100

Eric Blake wrote:
> According to Jim Meyering on 10/30/2009 6:00 AM:
>>>> @@ -1,7 +1,9 @@
>>>> -#!/usr/bin/perl
>>>> +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
>>>> +  & eval 'exec /usr/bin/perl -wS "$0" $argv:q'
>
> shouldn't that be perl, rather than /usr/bin/perl?

I could not arrange for that 2nd eval line to make a difference,
so figured it'd be best to leave it as is.

>>>> +    if 0;

My using "if 0" there was another change.
This was suggested :

                    eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}'
                    & eval 'exec /usr/bin/perl -wS $0 $argv:q'
                            if $running_under_some_shell;

But that use of $running_under_some_shell; evoked a warning.

>> Ok.  Ludovic, if you can confirm that this works on all systems
>> you care about, then I'll commit it.
>
> I'm not Ludovic, but I confirmed it works on cygwin 1.5 and 1.7 (with my
> tweak).

Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]