summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/rtld.c
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>2002-08-08 15:53:23 +0000
committerjdp <jdp@FreeBSD.org>2002-08-08 15:53:23 +0000
commit2f9d7d8897afc904c549448823b20db02b8d9367 (patch)
treeb0f57a5f520468f450d610352140d360fdedccaa /libexec/rtld-elf/rtld.c
parentd0d5298f030367cadef32cbd97135d2b9d693e70 (diff)
downloadFreeBSD-src-2f9d7d8897afc904c549448823b20db02b8d9367.zip
FreeBSD-src-2f9d7d8897afc904c549448823b20db02b8d9367.tar.gz
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.
Diffstat (limited to 'libexec/rtld-elf/rtld.c')
-rw-r--r--libexec/rtld-elf/rtld.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 8f3f4d4..a007ff5 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -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. */
}
OpenPOWER on IntegriCloud