--- pause.c.orig 2009-11-07 14:51:38.000000000 -0800 +++ pause.c 2009-11-07 14:51:40.000000000 -0800 @@ -30,6 +30,13 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)pause.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ + +/* For the cancelable variant, we call the cancelable sigsuspend */ +#ifdef VARIANT_CANCELABLE +#undef __DARWIN_NON_CANCELABLE +#define __DARWIN_NON_CANCELABLE 0 +#endif /* VARIANT_CANCELABLE */ + #include <sys/cdefs.h> __FBSDID("$FreeBSD: src/lib/libc/gen/pause.c,v 1.7 2007/01/09 00:27:54 imp Exp $"); @@ -42,7 +49,10 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/pau int __pause() { - return sigpause(sigblock(0L)); + sigset_t set; + + sigprocmask(0, NULL, &set); + return sigsuspend(&set); } __weak_reference(__pause, pause); __weak_reference(__pause, _pause);