delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/09/28/19:00:26

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: Wed, 28 Sep 2005 18:59:27 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Exec and parent environment
Message-ID: <20050928225927.GE26582@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <07cbd240f86b06954fe63730c9370fb8 AT swri DOT edu>
Mime-Version: 1.0
In-Reply-To: <07cbd240f86b06954fe63730c9370fb8@swri.edu>
User-Agent: Mutt/1.5.8i

On Wed, Sep 28, 2005 at 11:31:28AM -0500, Joey Mukherjee wrote:
>I am having a problem with some Cygwin compiled programs and am hoping 
>for some advice.  I have a menu program which is started from the 
>Desktop by its icon.  In this menu program, I modify the environment 
>for any child programs that it launches.  This works great until the 
>child program launches a child of its own.
>
>In the child code, I use execvp to do the launch; however, I don't 
>believe the child process (grandchild to menu program) is getting the 
>enviroment variables copied from the parent (child of menu program).
>
>Does this seem like a bug?  Is there a better way to do what I am doing?

If you're modifying the environment, you should be using putenv or setenv
to do so.  If those are truly not working then you should be able to
write a simple test case to demonstrate the problem.

If you are using the Windows API to set environment variables, then it
is possible that an execed cygwin process will not recognize them.  You
do need to use the cygwin *env functions for manipulating the cygwin
environment.

http://cygwin.com/problems.html

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