Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* OSF/1 Script loading problem...I think I know what's wrong, but don't know how to fix it!
@ 1997-09-29 14:18 Sprag Johnson
  0 siblings, 0 replies; only message in thread
From: Sprag Johnson @ 1997-09-29 14:18 UTC (permalink / raw)


Hi!
	I'd like to first mention that I'm not a kernel hacker, so I
could be completely off base here.

Here's my problem:
	I'm wanting to run perl compiled for OSF/1 (because sybperl
isn't available for linux).  when I do:
	perl <filename>
		it works just fine.
when I do:
	perl < <filename>
		it works just fine.

When I have a #!/usr/local/bin/perl script, it fails with a segfault.

I did some printk's in exec.c and I think that bprm->p is overwriting
the name of the interpriter.

Here's my modified chunk of code:
                printk("bprm->p=%d\n",bprm->p);
                remove_arg_zero(bprm);
                printk("bprm->p=%d\n",bprm->p);
                bprm->p = copy_strings(1, dynloader, bprm->page,bprm->p, 2);
                printk("bprm->p=%d\n",bprm->p);
 
Here's the output I got when I tried to run my test perl script:

bprm->p=261757
bprm->p=261777
bprm->p=261764

Assuming that bprm->p is a pointer (no docs that I could find) that
points to the command line, when it gets here the pointer should be
pointing at "/usr/local/bin/perl ./test.pl"

At the 2nd printk, the pointer looks like it is pointing to:
	"./test.pl"
In the case of sh_bang, it should still be pointing at
	"/usr/local/bin/perl ./test.pl"

At the third printk, it looks like the pointer is pointing to:
	"/sbin/loader ./test.pl"
which should really be
	"/sbin/loader /usr/local/bin/perl ./test.pl"

Correct?  Is this what's really happening?  Could some kind soul tell me
how to fix this?  Its not *critical* per se, but it is a misfeature.

I'm running 2.0.30.  Is this fixed in the pre-31's?

Thanks,
Brian Wheeler
bdwheele@indiana.edu

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-09-29 14:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-09-29 14:18 OSF/1 Script loading problem...I think I know what's wrong, but don't know how to fix it! Sprag Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox