From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11500 invoked from network); 9 Jun 1997 08:58:53 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 9 Jun 1997 08:58:53 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA17517; Mon, 9 Jun 1997 04:36:00 -0400 (EDT) Resent-Date: Mon, 9 Jun 1997 04:36:00 -0400 (EDT) From: Juergen Peter "bluen" Message-Id: <199706090840.KAA02522@ee.uni-sb.de> Subject: incorrect behavior of zsh under su on SUNOS-4.1.3 To: zsh-workers@math.gatech.edu Date: Mon, 9 Jun 1997 10:40:05 +0200 (MET DST) Reply-To: bluen@ee.uni-sb.de X-Attribution: bluen X-PGP-public-key: finger bluen@macrosun.ee.uni-sb.de X-Mailer: ELM [version 2.4 PL24 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Resent-Message-ID: <"fWWiP3.0.eH4.l1ycp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3221 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hello Folks, Some problems have been encountered here when using ZSH-3.1.2 on a SunOS-4.1.3 system. It looks very much like that if invoked from other programs in a way like exec("/path/to/zsh", argv[0], other_args) what many programs do to spawn a shell or a subshell, zsh_name (the variable in the sourcecode) is set to argv[0] of the spawning program. This looks quite ok for me (at least for most programs), but when the shell-spawning program is /bin/su (or /usr/5bin/su) of SunOS, this prevents the shell from reading its initialisation files (/etc/zshenv and so on), which isnīt correct behaviour according to the documentation of su(1). Other programs calling exec*(2) in a similar way lead to the same problem (I checked elm-2.4 for example). Maybe some of you folks would like to address the problem and solve it like this: if zsh_name is set to something different than zsh (or -zsh), always set it to "zsh", so that init files are read for every subshell in the ususal way. Maybe this is best done by adding something like (below line # 53 in main.c) if (strcmp(zsh_name,"zsh") != 0 && strcmp(zsh_name, "-zsh") !=0 ) zsh_name="zsh"; or even by replacing line 53 in main.c with zsh_name = "zsh"; Of course, there might be trouble somewhere else when solving the problem like this (like we do here at our installation), so that there may be better solutions (Iīm not a shell-hacker). If you have suggestions for better solutions of my problem or want additional information, please email me directly because Iīm not subscribed to zsh-workers, zsh-users (I donīt even remember being subscribed to zsh-announce). bluen -- Juergen Peter | PGP encrypted mail is welcome. Lehrstuhl fuer Mikroelektronik | See my homepage for disclaimer! Univ. Geb. 13, Postfach 151150, | email: bluen@ee.uni-sb.de 66041 Saarbruecken | http://www.ee.uni-sb.de/~bluen/