summaryrefslogtreecommitdiff
path: root/libexec/ld.so/dlfcn.c
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2010-05-02 04:57:02 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2010-05-02 04:57:02 +0000
commit64bbd9e4628abe8823de2913a59d94d90d53e524 (patch)
treed0cb7c94b69ee863c7bf83e9259e9b2a17deb654 /libexec/ld.so/dlfcn.c
parentb4b6194a60b2e4ac571bb4b5a0ce6d006f8d9a32 (diff)
Combine the signal mask handling into _dl_thread_bind_lock(), as it's MI.
ok drahn@
Diffstat (limited to 'libexec/ld.so/dlfcn.c')
-rw-r--r--libexec/ld.so/dlfcn.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libexec/ld.so/dlfcn.c b/libexec/ld.so/dlfcn.c
index f64245203cb..f09b8b5603e 100644
--- a/libexec/ld.so/dlfcn.c
+++ b/libexec/ld.so/dlfcn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dlfcn.c,v 1.80 2008/06/13 23:14:47 kurt Exp $ */
+/* $OpenBSD: dlfcn.c,v 1.81 2010/05/02 04:57:01 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -516,10 +516,18 @@ _dl_show_objects(void)
}
void
-_dl_thread_bind_lock(int what)
+_dl_thread_bind_lock(int what, sigset_t *omask)
{
+ if (! what) {
+ sigset_t nmask;
+
+ sigfillset(&nmask);
+ _dl_sigprocmask(SIG_BLOCK, &nmask, omask);
+ }
if (_dl_bind_lock_f != NULL)
(*_dl_bind_lock_f)(what);
+ if (what)
+ _dl_sigprocmask(SIG_SETMASK, omask, NULL);
}
void