Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: /usr/bin/script annoyance
- X-seq: zsh-users 1821
- From: Ken Lareau <elessar@xxxxxxxxxxxxxxxxxx>
- To: Dan Nelson <dnelson@xxxxxxxxxxxx>
- Subject: Re: /usr/bin/script annoyance
- Date: Wed, 16 Sep 1998 12:53:46 -0400
- Cc: zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: Your message of "Wed, 16 Sep 1998 11:41:38 CDT." <19980916114138.A23822@xxxxxxxxxxxx>
In message <19980916114138.A23822@xxxxxxxxxxxx>, Dan Nelson writes:
>The prototype for the execve syscall is usually
>
>execve(const char *path, char *const argv[], char *const envp[])
>
>and the string that determines sh compatibility mode for zsh is not
>'path', but 'argv[0]'. If you were to run script under dbx and break
>on the execve call, I'd bet anything that the contents of the string at
>0xEFFFF918 is "sh".
That would make sense, lucky me. :)
>Zefram's solution to this problem is the shortest:
>
>> Alternatively, set your SHELL to be the executable of this program:
>>
>> extern char **environ;
>> int main(int argc, char **argv)
>> {
>> if(argc != 0)
>> argv[0] = "zsh";
>> execve("/usr/local/bin/zsh", argv, environ);
>> _exit(1);
>> }
>
>That'll guarantee that zsh gets called as "zsh".
I did this, and thankfully, it worked. Really screwed up way to do it,
but it works. :) Thanks for the help, it was greatly appreciated.
Of course, this brings up one more question... is this something that
can be fixed eventually in zsh?
Ken Lareau
elessar@xxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author