]> git.saurik.com Git - apple/libc.git/blame - gen/FreeBSD/pause.c.patch
Libc-594.1.4.tar.gz
[apple/libc.git] / gen / FreeBSD / pause.c.patch
CommitLineData
224c7076
A
1--- pause.c.orig 2006-09-17 12:11:15.000000000 -0700
2+++ pause.c 2006-09-24 16:38:00.000000000 -0700
3@@ -34,6 +34,13 @@
4 #if defined(LIBC_SCCS) && !defined(lint)
5 static char sccsid[] = "@(#)pause.c 8.1 (Berkeley) 6/4/93";
6 #endif /* LIBC_SCCS and not lint */
7+
8+/* For the cancelable variant, we call the cancelable sigsuspend */
9+#ifdef VARIANT_CANCELABLE
10+#undef __DARWIN_NON_CANCELABLE
11+#define __DARWIN_NON_CANCELABLE 0
12+#endif /* VARIANT_CANCELABLE */
13+
14 #include <sys/cdefs.h>
15 __FBSDID("$FreeBSD: src/lib/libc/gen/pause.c,v 1.6 2002/02/01 00:57:29 obrien Exp $");
16
17@@ -46,7 +53,10 @@
18 int
19 __pause()
20 {
21- return sigpause(sigblock(0L));
22+ sigset_t set;
23+
24+ sigprocmask(0, NULL, &set);
25+ return sigsuspend(&set);
26 }
27 __weak_reference(__pause, pause);
28 __weak_reference(__pause, _pause);