From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <89fb90c353cbe8b23523dd780149b43e.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199709291418.JAA19165@hamlet.ucs.indiana.edu> Date: Mon, 29 Sep 1997 09:18:46 -0500 (EST) From: Sprag Johnson Subject: OSF/1 Script loading problem...I think I know what's wrong, but don't know how to fix it! 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 it works just fine. when I do: perl < 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