This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: getenv not thread safe


On Mon, Aug 15, 2005 at 03:16:56AM -0700, Paul Orang wrote:
> http://blogs.sun.com/roller/page/pgdh/20050614 points
> out that glibc getenv is not protected against
> parallel setenvs. Can it be fixed?

getenv is not required to be thread-safe, see
http://www.opengroup.org/onlinepubs/009695399/functions/getenv.html
The string returned by getenv may become invalid after next
setenv/putenv/unsetenv call, so any program relying on thread-safety
of these is broken.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]