aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2010-03-04 07:12:44 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2010-03-04 07:12:44 +0000
commitbd94a8bcdc31f341d626dbdd77cf8e9ba8a39af4 (patch)
treeff186be2dd007dcbedb2e0d8ad86fb6fe38e64f7 /lib
parenta6179399953633d27195d9d87eb2c8396136a0c5 (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/pause.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libc/gen/pause.c b/lib/libc/gen/pause.c
index 86d3643435d3..cb0fa97f6b94 100644
--- a/lib/libc/gen/pause.c
+++ b/lib/libc/gen/pause.c
@@ -33,8 +33,10 @@ static char sccsid[] = "@(#)pause.c 8.1 (Berkeley) 6/4/93";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "namespace.h"
#include <signal.h>
#include <unistd.h>
+#include "un-namespace.h"
/*
* Backwards compatible pause.
@@ -42,7 +44,11 @@ __FBSDID("$FreeBSD$");
int
__pause()
{
- return sigpause(sigblock(0L));
+ sigset_t oset;
+
+ if (_sigprocmask(SIG_BLOCK, NULL, &oset) == -1)
+ return (-1);
+ return (_sigsuspend(&oset));
}
__weak_reference(__pause, pause);
__weak_reference(__pause, _pause);