[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Requesting help with C extension
- From: Andrew Gierth <andrew@...>
- Date: Fri, 20 Jul 2018 07:07:12 +0100
>>>>> "Simon" == Simon Wunderlin <email@example.com> writes:
Simon> For my application to work I need to set environment variables.
Simon> Therefore I have written a simple Lua C extensions to do so:
putenv() is dangerous; if your OS has setenv() you should use that
The problem with putenv() is that it does not copy the supplied string,
it just puts a pointer to it into the environment. setenv(), in
contrast, makes a copy of the supplied string.