From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26825 invoked by alias); 4 Nov 2011 20:22:36 -0000 Received: (qmail 26811 invoked by uid 22791); 4 Nov 2011 20:22:35 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_40,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ww0-f45.google.com (HELO mail-ww0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Nov 2011 20:22:19 +0000 Received: by wwe6 with SMTP id 6so3207829wwe.2 for ; Fri, 04 Nov 2011 13:22:17 -0700 (PDT) Received: by 10.216.137.70 with SMTP id x48mr1319207wei.103.1320438137741; Fri, 04 Nov 2011 13:22:17 -0700 (PDT) Received: from localhost (173.Red-88-13-238.dynamicIP.rima-tde.net. [88.13.238.173]) by mx.google.com with ESMTPS id n2sm368643wiz.16.2011.11.04.13.22.15 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Nov 2011 13:22:16 -0700 (PDT) Date: Fri, 04 Nov 2011 20:22:00 -0000 From: David Sastre To: cygwin@cygwin.com Cc: cygwin@cygwin.com Subject: Re: Why 'script' utility require SHELL (and work fine under Linux)? Message-ID: <20111104202213.GA10510@jethro.local.lan> References: <4EB372A3.6020806@laposte.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qMm9M+Fa2AknHoGS" Content-Disposition: inline In-Reply-To: <4EB372A3.6020806@laposte.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-11/txt/msg00074.txt.bz2 --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1263 On Fri, Nov 04, 2011 at 06:05:39AM +0100, Cyrille Lefevre wrote: > the base-file maintainer has been BCC'ed to add the export SHELL to > the /etc/profile. GNU/Linux login sets SHELL to bash, mksh, ... whilst ssh sets SHELL to /bin/bash, /bin/posh, /bin/mksh ... Given that there is no real login into cygwin (yet?), SHELL should be set to the expected login value. Assuming SHELL would be set and exported for login shells, i.e., further (nested) callings to interactive, non-login shells would inherit the original (login) SHELL value (as in GNU/Linux): $ echo $SHELL bash $ mksh $ echo $SHELL bash It could be fixed for bash, zsh, and mksh. Even for nested calls to login shells (which GNU/Linux doesn't honor) by setting SHELL=20 for every ifdef in /etc/profile. Collateral damage: -posh works OK if set as login shell in /etc/passwd, but it is broken=20 when called from command line as login shell (i.e. it ignores both=20 /etc/profile and ~/.profile) -sh thinks she's bash: =20 $ bash -l $ echo $SHELL bash $ mksh -l $ echo $SHELL mksh $ sh -l $ echo $SHELL bash $ posh -l $ echo $SHELL bash In short: it's not clear to me how to add this functionality consistently. --=20 Huella de clave primaria: AD8F BDC0 5A2C FD5F A179 60E7 F79B AB04 5299 EC56 --qMm9M+Fa2AknHoGS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 230 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EAREIAAYFAk60SXUACgkQ95urBFKZ7FaLhAD+Nu5SDSxg57bqr0t6pmroHmic SV+g5Xw1q3TWy1K8EcUA/iop7Lwgah32Z8oOagAwBCDabOdOsFTSdOrrPIqIJJU2 =z5Q/ -----END PGP SIGNATURE----- --qMm9M+Fa2AknHoGS--