From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10293 invoked from network); 16 Sep 1998 17:02:03 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 16 Sep 1998 17:02:03 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id MAA10222; Wed, 16 Sep 1998 12:54:51 -0400 (EDT) Resent-Date: Wed, 16 Sep 1998 12:51:03 -0400 (EDT) Message-Id: <199809161653.MAA06850@mailhost2.squonk.net> To: Dan Nelson cc: zsh-users@math.gatech.edu Subject: Re: /usr/bin/script annoyance In-reply-to: Your message of "Wed, 16 Sep 1998 11:41:38 CDT." <19980916114138.A23822@emsphone.com> Date: Wed, 16 Sep 1998 12:53:46 -0400 From: Ken Lareau Resent-Message-ID: <"Nxspe1.0.YT2.tn-_r"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1821 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu In message <19980916114138.A23822@emsphone.com>, 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@numenor.org