Avoid getenv() - dlsym() - calloc() - getenv() racemaster
commit8f3a28e453f30c04185478864860c72afff6669e
authorPetr Baudis <pasky@ucw.cz>
Sat, 3 Jul 2010 15:34:50 +0000 (3 17:34 +0200)
committerPetr Baudis <pasky@ucw.cz>
Sat, 3 Jul 2010 15:34:50 +0000 (3 17:34 +0200)
treefdaf7958a550895b8bfa2bc22dbfc117fa5b7bcc
parent03b748edb4622e81991069332c26cce03b3fed6f
Avoid getenv() - dlsym() - calloc() - getenv() race

This causes new firefox to hang; the first getenv() call comes from
calloc(), but this means a nasty race condition; setup up_getenv in a
constructor instead, and give an empty string to getenv() from the
calloc() of up_getenv dlsym(). Ugh.
screenenv.c