]> git.saurik.com Git - apple/libc.git/blob - gen/FreeBSD/pause.c.patch
Libc-763.13.tar.gz
[apple/libc.git] / gen / FreeBSD / pause.c.patch
1 --- pause.c.orig 2009-11-07 14:51:38.000000000 -0800
2 +++ pause.c 2009-11-07 14:51:40.000000000 -0800
3 @@ -30,6 +30,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.7 2007/01/09 00:27:54 imp Exp $");
16
17 @@ -42,7 +49,10 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/pau
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);