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:
jdp 2002-08-08 15:53:23 +00:00
parent d0d5298f03
commit 2f9d7d8897

View File

@ -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. */
}