Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Where should I post such things?

by svenXY (Deacon)
on Jan 24, 2008 at 10:57 UTC ( #663984=note: print w/replies, xml ) Need Help??


in reply to Where should I post such things?

Hi,
IMHO, the message is very clear. bash spits out more information because you have it (blabla) in the shebang line and it therefore complains about a bad interpreter.

The rest of the message is the same and comes from the OS.

Cheers, Sven

Replies are listed 'Best First'.
Re^2: Where should I post such things?
by svenXY (Deacon) on Jan 24, 2008 at 11:05 UTC
    Hi,
    small correction:
    exec does not find the file although it should:
    ~/tmp$ ./x bash: ./x: /blabla: bad interpreter: No such file or directory ~/tmp$ perl -e 'exec("x") || die($!)' No such file or directory at -e line 1. ~/tmp$ perl -e 'exec("~/tmp/x") || die($!)' sh: /home/svenXY/tmp/x: /blabla: bad interpreter: No such file or dire +ctory
    but
    $ perl -e 'exec("pwd") || die($!)' /home/svenXY/tmp
    So now you know why the messages are different, but I'm confused as to why exec does not find file x...
    Regards,
    svenXY

      exec respects $ENV{PATH} (or rather, exec uses the OS, and the OS respects $ENV{PATH}), and "." seems to be not in the path (and the OS seems to be one which does not have "." as a mandatory default in the list of directories searched for the executable).

      In both cases -- according to ktrace(1) on FreeBSD 6-STABLE with Perl 5.8.8 in zsh 4 -- perl is complaining, through execve(2), about the missing interpreter not the file itself being executed.

      Corion's reply reminded me that I just had added '.' to the path; thanks. It turns out the message, or rather error from execve(2), is the same whether the problem is not finding the file being executed, or if found, with missing interpreter listed in the file. Anyawy, what OP said.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://663984]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2023-12-05 01:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (25 votes). Check out past polls.

    Notices?