Opened 10 years ago

Last modified 10 years ago

#42 closed defect

ash: Search for script interpreter in PATH — at Version 3

Reported by: dmik Owned by:
Priority: major Milestone:
Component: shell Version:
Severity: Keywords:
Cc:

Description (last modified by dmik)

ash doesn't currently search for the interpreter specified with the !# magic in PATH (as kLIBC spawnvp does). See comment:1 for more info.

Change History (3)

comment:1 by dmik, 10 years ago

There is at least one problem that I want to fix: ash doesn't currently search for the interpreter specified with the !# magic in PATH (as kLIBC spawnvp does). As a result, the following script t.pl:

#!/usr/bin/perl

print "Hello"

will give the following error when run from a shell script or by sh.exe directly (via the -c option):

D:>sh -c ./t.pl
./t.pl: /usr/bin/perl: not found

As opposed to that, spawnvp will search for perl in PATH if it finds out that /usr/bin/perl doesn't exist.

comment:2 by Silvan Scherrer, 10 years ago

This also refers to #26 and #27

Last edited 10 years ago by Silvan Scherrer (previous) (diff)

comment:3 by dmik, 10 years ago

Description: modified (diff)
Summary: ash: Bring to portsash: Search for script interpreter in PATH
Type: taskdefect

Yes, #26 is already about bringing it to ports. So I changed the subject of this ticket to be an ASH defect then. And we need #26 to be done before resolving this one.

Note: See TracTickets for help on using tickets.