diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-08-19 20:05:08 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-08-19 20:05:08 +0000 |
commit | 7195db12adc439aa7e4b1f494b144031dd50e30a (patch) | |
tree | ff46404749aca5fc8f1b78bc17a4b1a94521526d /sysdeps/generic/setenv.c | |
parent | 70aea399c8b3661f238b947c3f151866d3260c24 (diff) | |
download | glibc-7195db12adc439aa7e4b1f494b144031dd50e30a.zip glibc-7195db12adc439aa7e4b1f494b144031dd50e30a.tar.gz glibc-7195db12adc439aa7e4b1f494b144031dd50e30a.tar.bz2 |
Update.
1999-08-19 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/setenv.c: Update(__add_to_environ): Initialize
ep after we have the lock.
* sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h: New file.
Patch by Richard Henderson.
Diffstat (limited to 'sysdeps/generic/setenv.c')
-rw-r--r-- | sysdeps/generic/setenv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/generic/setenv.c b/sysdeps/generic/setenv.c index 387152d..29fc60c 100644 --- a/sysdeps/generic/setenv.c +++ b/sysdeps/generic/setenv.c @@ -113,13 +113,17 @@ __add_to_environ (name, value, combined, replace) const char *combined; int replace; { - register char **ep = __environ; + register char **ep; register size_t size; const size_t namelen = strlen (name); const size_t vallen = value != NULL ? strlen (value) + 1 : 0; LOCK; + /* We have to get the pointer now that we have the lock and not earlier + since another thread might have created a new environment. */ + ep = __environ; + size = 0; if (ep != NULL) { |