blob: 60167039936ff166ddb38283843723f556a96462 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* $OpenBSD: pause.c,v 1.4 2003/06/25 21:15:04 deraadt Exp $ */
/*
* Written by Todd C. Miller <Todd.Miller@courtesan.com>
* Public domain.
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$OpenBSD: pause.c,v 1.4 2003/06/25 21:15:04 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <signal.h>
#include <unistd.h>
/*
* Backwards compatible pause(3).
*/
int
pause()
{
sigset_t mask;
return (sigprocmask(SIG_BLOCK, NULL, &mask) ? -1 : sigsuspend(&mask));
}
|