1/* $OpenBSD: pause.c,v 1.7 2019/01/25 00:19:25 millert Exp $ */ 2 3/* 4 * Written by Todd C. Miller <millert@openbsd.org> 5 * Public domain. 6 */ 7 8#include <signal.h> 9#include <unistd.h> 10 11/* 12 * Backwards compatible pause(3). 13 */ 14int 15pause(void) 16{ 17 sigset_t mask; 18 19 return (sigprocmask(SIG_BLOCK, NULL, &mask) ? -1 : sigsuspend(&mask)); 20} 21