mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-15 15:28:17 +08:00
Update to FreeBSD head 2017-08-01
Git mirror commit f5002f5e5f78cae9f0269d812dc0aedb0339312c. Update #3472.
This commit is contained in:
@@ -544,7 +544,7 @@ fin:
|
||||
vector_sort(_nsmod, _nsmodsize, sizeof(*_nsmod), string_compare);
|
||||
}
|
||||
|
||||
|
||||
static int exiting = 0;
|
||||
|
||||
static void
|
||||
ns_mod_free(ns_mod *mod)
|
||||
@@ -555,12 +555,10 @@ ns_mod_free(ns_mod *mod)
|
||||
return;
|
||||
if (mod->unregister != NULL)
|
||||
mod->unregister(mod->mtab, mod->mtabsize);
|
||||
if (mod->handle != nss_builtin_handle)
|
||||
if (mod->handle != nss_builtin_handle && !exiting)
|
||||
(void)dlclose(mod->handle);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Cleanup
|
||||
*/
|
||||
@@ -569,6 +567,7 @@ nss_atexit(void)
|
||||
{
|
||||
int isthreaded;
|
||||
|
||||
exiting = 1;
|
||||
isthreaded = __isthreaded;
|
||||
if (isthreaded)
|
||||
(void)_pthread_rwlock_wrlock(&nss_lock);
|
||||
@@ -617,8 +616,6 @@ rtems_nss_register_module(const char *source, ns_mtab *mtab,
|
||||
}
|
||||
#endif /* __rtems__ */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Finally, the actual implementation.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user