Here's my problem: I need to use Sybperl, which I can only
build on OSF/1 (unless someone knows how I can build it on
alpha/linux!). I've built it, and it works just fine...EXCEPT when its
being called by the #! line in the script....
torgo> cat > hello
#!/usr/local/bin/perl
print "Hello!\n";
^D
torgo> chmod 755 hello
torgo> ./hello
Segmentation Fault (core dumped)
torgo> /usr/local/bin/perl hello
Hello!
torgo> /usr/local/bin/perl
print "Hello!\n";
^D
Hello!
torgo>
When I strace ./hello, it looks like this:
execve("./hello", ["./hello"], [/* 17 vars */]) = 0
getpagesize() = 0x2000
getpagesize() = 0x2000
brk(0x3ffc0003e20) = 0x3ffc0003e20
brk(0x3ffc0007e20) = 0x3ffc0007e20
open("./hello", O_RDONLY) = 3
getxuid() = 0
getxgid(0x3ffc0003000) = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 0}, ru_stime={0, 0}, ...}) = 0
getrusage(RUSAGE_CHILDREN, {ru_utime={0, 0}, ru_stime={0, 0}, ...}) = 0
read(3, "#!/usr/local/bin/perl\nprint \"H"..., 2664) = 40
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
This has been a really annoying problem for me, since we're setting up a
web site on alpha/linux and I have to write shell scripts which exec
perl...and I'd like to just have a single copy of perl (instead of both
native and OSF/1 versions!) on the machine...
If I knew how /sbin/loader worked, I might give binfmt_misc a
shot...thoughts?
Brian Wheeler
bdwheele@indiana.edu