X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=0.7 required=5.0	tests=AWL,BAYES_20,FREEMAIL_FROM,RCVD_IN_PSBL,RP_MATCHES_RCVD,SARE_FREE_WEBM_LAPOSTE
X-Spam-Check-By: sourceware.org
Message-ID: <4EB372A3.6020806@laposte.net>
Date: Fri, 04 Nov 2011 06:05:39 +0100
From: Cyrille Lefevre <cyrille.lefevre-lists@laposte.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Why 'script' utility require SHELL (and work fine under Linux)?
References: <j7908e$hjt$1@dough.gmane.org>
In-Reply-To: <j7908e$hjt$1@dough.gmane.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id pA454bmU022232

Le 14/10/2011 11:43, Oleksandr Gavenko a écrit :
> Look to my session:

well, you session isn't very clear, however...

> As you can see first time script does not use SHELL, second time use it
> and third tie use it.
>
> So SHELL env var does not exported by bash...

well, shells doesn't export anything except variables already
exported at shell invocation or using the export builtin.

 > Why?

so, under unix like, $SHELL is positionned by login or whatever
process (sshd, telnetd, X gui, etc.) which launch the interactive
shell.
under cygwqin, $SHELL is well positionned when connected through the 
network (sshd) but not when launched by cygwin.bat.

> Is this right add
>
> export SHELL
>
> to '~/.bashrc'?

.bash_profile is more appropriate.

the base-file maintainer has been BCC'ed to add the export SHELL to the 
/etc/profile.

Regards,

Cyrille Lefevre
-- 
mailto:Cyrille.Lefevre-lists@laposte.net


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


