delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/07/25/06:28:23

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <397D6B77.51D3B6A6@cygnus.com>
Date: Tue, 25 Jul 2000 12:27:03 +0200
From: Corinna Vinschen <vinschen AT cygnus DOT com>
Reply-To: cygwin <cygwin AT sources DOT redhat DOT com>
X-Mailer: Mozilla 4.73 [en] (X11; I; Linux 2.2.14-SMP i686)
X-Accept-Language: de, en
MIME-Version: 1.0
To: Andrej Borsenkow <Andrej DOT Borsenkow AT mow DOT siemens DOT ru>
CC: Cygwin AT Sourceware DOT Cygnus DOT Com
Subject: Re: putenv() - copying environment string violates Unix specs?
References: <000e01bff606$02e2d500$21c9ca95 AT mow DOT siemens DOT ru>

Andrej Borsenkow wrote:
> 
> According to putenv() description SUS V2, the argument is used "as is"
> and never copied. Cygwin version of putenv() explicitly copies argument
> (actually, multiple times - first in putenv() and then in setenv()).
> This is horribly confusing for programs that expect to manage
> environment strings themselves and/or have own memory allocator (like
> Zsh). It means, that every use must be checked and free'ing of
> environment string put under #ifdef __CYGWIN__
> 
> Is there any particular reason for this? Is there any chance that it may
> be changed to be more Unix-compatible?

You're right and I think it should possible to change that but
I'm not sure if that will make it into 1.1.3.

Corinna

-- 
Corinna Vinschen
Cygwin Developer
Cygnus Solutions, a Red Hat company

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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