On Mar 14, Julian Gilbey wrote:

> On Thu, Mar 14, 2002 at 01:49:35PM +0100, Harald Koenig wrote:
> > > Alternatively, or in addition, it could do:
> > > 
> > > #!/usr/bin/perl -w
> > > 
> > > eval 'exec perl -wS $0 ${1+"$@"}'
> > >     if $running_under_some_shell;
> > 
> > using this method in our environment on HP-UX 11.00 I get
> > 
> >     /tmp > thumbpdf
> >     interpreter "/usr/bin/perl" not found
> >     /usr/local/bin/thumbpdf[7]: /usr/local/teTeX/bin/thumbpdf:  nicht gefunden.
> > 
> > so, without a configure script to locate perl this doesn't seem to work
> 
> I don't understand what you mean by this.
> 
> If you edit /usr/local/teTeX/bin/thumbpdf by adding the two lines:
> 
>  eval 'exec perl -wS $0 ${1+"$@"}'
>      if $running_under_some_shell;
> 
> immediately after the #!/usr/bin/perl line, and then try running it
> using the exec command from your wrapper, what happens?  Do you still
> get the program dying?

exactly.  the "exec ..../bin/thumbpdf" doesn't work if

        #!/wrong/dir/doesnt_exist

can't be executed.  no fallback, just the error which I've mentioned above.
that's not specific to HPUX, it's the same in Linux, too:

bash: 
        ./test.sh: No such file or directory

tcsh:
        ./test.sh: Command not found.



Harald Koenig
-- 
"I hope to die                                      ___       _____
before I *have* to use Microsoft Word.",           0--,|    /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen.        <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig                                          \/\/\/\/\/\/\/\/\/
science+computing ag                                    //  /     \\  \
[EMAIL PROTECTED]                            ^^^^^       ^^^^^

Reply via email to