blob: c7fc83c0a676e1df8fca1c0f10e775040bcc2bbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* $OpenBSD: pause.c,v 1.3 2001/09/04 23:35:58 millert 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.3 2001/09/04 23:35:58 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <signal.h>
/*
* Backwards compatible pause(3).
*/
int
pause()
{
sigset_t mask;
return (sigprocmask(SIG_BLOCK, NULL, &mask) ? -1 : sigsuspend(&mask));
}
|