delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/03/18:47:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Fri, 3 Dec 2004 18:47:41 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.5.12: TERM environment reset to "cygwin" after fork()
Message-ID: <20041203234741.GN29883@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <C1A7FA5F2793A94BA223673B8ADAF4A1037463AE AT exchange DOT air2web DOT com>
Mime-Version: 1.0
In-Reply-To: <C1A7FA5F2793A94BA223673B8ADAF4A1037463AE@exchange.air2web.com>
User-Agent: Mutt/1.4.1i

On Fri, Dec 03, 2004 at 04:44:01PM -0500, Richard Campbell wrote:
>>Provide a simple test case, that is compilable and linkable so that
>>we can investigate your claim.
>
>#include <stdio.h>
>
>int main(int argc, char **argv)
>{
>   setenv("TERM", "ansi", 1);
>    /* ... blah, blah, ... */
>    printf("TERM is: %s\n", getenv("TERM"));  /* prints "ansi" as expected */
>    int i = fork();
>    if (i < 0)
>        printf("Bad Business...");
>    else if ( i > 0 )
>        printf("parent TERM is: %s\n", getenv("TERM")); 
>    else
>        printf("child  TERM is: %s\n", getenv("TERM")); 
>}
>
>C:\dl>a.exe
>TERM is: ansi
>parent TERM is: ansi
>child  TERM is: cygwin

Thanks.  That pinpointed the problem it will be fixed in the next release.

Ordinarily I'd say "try a snapshot" but apparently I've destabilized things
a bit in snapshot land so I wouldn't recommend using a snapshot right now.

cgf

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

- Raw text -


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