lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

>>>>> "Simon" == Simon Wunderlin <> 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.