delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/10/05/18:36:13

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE
X-Spam-Check-By: sourceware.org
X-Yahoo-SMTP: Uu383n6swBCEN1G9up0WSnxbvN8fCPmk
Message-ID: <4CABA847.9050608@cygwin.com>
Date: Tue, 05 Oct 2010 18:35:51 -0400
From: "Larry Hall \(Cygwin\)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090320 Remi/2.0.0.21-1.fc8.remi Lightning/0.9 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: bash bug?: nested "bash --login -i" doesn't run /etc/profile (still runs ~/.bash_profile)
References: <4CA4CFE3 DOT 1090300 AT fgm DOT com> <4CA9FE9B DOT 7020004 AT fgm DOT com> <4CAA4056 DOT 2070207 AT cygwin DOT com> <4CAB323A DOT 6060802 AT fgm DOT com>
In-Reply-To: <4CAB323A.6060802@fgm.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 10/5/2010 10:12 AM, Daniel Barclay wrote:
> Larry Hall (Cygwin) wrote:
>> On 10/4/2010 12:19 PM, Daniel Barclay wrote:
>>> I wrote:
>>>> The behavior of "bash --login -i" seems to vary depending on whether
>>>> it is a "root" invocation or a nested invocation of bash. This is
>>>> inconsistent with the description man bash, and seems to be a bug.
>>>
>>> Can anyone confirm (or "anti-confirm") this behavior?:
>>>
>>>
>>>> Details:
>>>>
>>>>
>>>> When bash is started using the Cygwin shortcut (which runs cygwin.bat,
>>>> which executes "bash --login -i"), bash reads files /etc/profile and
>>>> ~/.bash_profile. (Running "bash --login -i" from an interactive
>>>> "cmd" shell does the same.)
>>>>
>>>> However, when in that first bash process, another bash is started with
>>>> that same "bash --login -i" command, bash does _not_ read /etc/profile.
>>
>> Works for me.
>
> How did you detect that that second bash runs /etc/profile?

I added "set -x" to the file so it would show me when it was running.

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019