mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-24 07:40:52 +00:00
Don't acquire the writer lock in rtld_exit when clearing the shared
objects' reference counts. This function is called by the atexit mechanism at program shutdown. I don't think the locking is necessary here. It caused OpenOffice builds to hang more often than not. Credit to Martin Blapp and Matt Dillon for helping to diagnose this problem and for testing the fix.
This commit is contained in:
parent
fd78f7e0f3
commit
0df23e4bd5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=101532
@ -1460,11 +1460,9 @@ rtld_exit(void)
|
||||
Obj_Entry *obj;
|
||||
|
||||
dbg("rtld_exit()");
|
||||
wlock_acquire();
|
||||
/* Clear all the reference counts so the fini functions will be called. */
|
||||
for (obj = obj_list; obj != NULL; obj = obj->next)
|
||||
obj->refcount = 0;
|
||||
wlock_release();
|
||||
objlist_call_fini(&list_fini);
|
||||
/* No need to remove the items from the list, since we are exiting. */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user