[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Win32] putenv modifications not inherited by child processed (Was:
From: |
Michael Goffioul |
Subject: |
Re: [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv) |
Date: |
Fri, 15 Feb 2013 15:16:39 -0500 |
On Fri, Feb 15, 2013 at 2:10 PM, Paul Eggert <address@hidden> wrote:
On 02/15/2013 07:10 AM, Michael Goffioul wrote:
> I guess the only solution to this problem is to always _putenv and not manipulate "environ" directly.
Thanks, is that something you can write and contribute
to the GNU project? This sort of thing really requires
Microsoft expertise, which I don't have.
I can give it a try, but not before a couple of days. Also to avoid breaking things, what is the putenv module supposed to solve? From what I understand, it is:
- make putenv("VARNAME") remove VARNAME from the environment
- make putenv("VARNAME=") create and empty environment variable
Is there anything else?
Reading the specs here [1], I don't think the bit: "In either case, the string pointed to by string shall become part of the environment, so altering the string shall change the environment." is actually possible. I believe _putenv ultimately calls SetEnvironmentVariable [2] and nothing there says that altering the given string will effectively alter the environment.
Michael.
- [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv), Michael Goffioul, 2013/02/15
- Re: [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv), Paul Eggert, 2013/02/15
- Re: [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv),
Michael Goffioul <=
- Re: [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv), Paul Eggert, 2013/02/17
- Re: [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv), John W. Eaton, 2013/02/17
- Re: [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv), Michael Goffioul, 2013/02/17
- Re: [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv), Paul Eggert, 2013/02/18
- Re: [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv), John W. Eaton, 2013/02/19
- Re: [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv), Paul Eggert, 2013/02/19
- Re: [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv), John W. Eaton, 2013/02/19
- Re: [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv), Michael Goffioul, 2013/02/22
- Re: [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv), Paul Eggert, 2013/02/22
- Re: [Win32] putenv modifications not inherited by child processed (Was: Heap corruption in putenv), Michael Goffioul, 2013/02/22