Messages in this thread | | | From | Sprag Johnson <> | Subject | OSF/1 Script loading problem...I think I know what's wrong, but don't know how to fix it! (fwd) | Date | Tue, 30 Sep 1997 11:53:48 -0500 (EST) |
| |
I mailed this to the axp-list at redhat, but haven't gotten any good suggestions yet. Any thoughts? Its not totally critical, but it is pretty annoying.
Thanks! Brian Wheeler bdwheele@Indiana.edu
Forwarded message: > From axp-list-request@redhat.com Mon Sep 29 09:20:52 EST 1997 > Resent-Date: 29 Sep 1997 14:19:11 -0000 > Resent-Cc: recipient list not shown: ; > MBOX-Line: From axp-list-request@redhat.com Mon Sep 29 10:19:09 1997 > From: Sprag Johnson <bdwheele@indiana.edu> > Message-Id: <199709291418.JAA19165@hamlet.ucs.indiana.edu> > Subject: OSF/1 Script loading problem...I think I know what's wrong, but don't know how to fix it! > To: axp-list@redhat.com > Date: Mon, 29 Sep 1997 09:18:46 -0500 (EST) > X-Mailer: ELM [version 2.4 PL23] > MIME-Version: 1.0 > Content-Type: text/plain; charset=US-ASCII > Content-Transfer-Encoding: 7bit > Resent-Message-ID: <"CO9d02.0.BC7.SZxBq"@mail2.redhat.com> > Resent-From: axp-list@redhat.com > Reply-To: axp-list@redhat.com > X-Mailing-List: <axp-list@redhat.com> archive/latest/9262 > X-Loop: axp-list@redhat.com > Precedence: list > Resent-Sender: axp-list-request@redhat.com > X-URL: http://www.redhat.com > > 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 > >
| |