headers/bsd: Add sys/queue.h.
[haiku.git] / src / system / libroot / posix / unistd / pause.c
blob757d184accb442f8a5422aa2065c23677ff7eac1
1 /*
2 * Copyright (c) 2005, Haiku Project. All rights reserved.
3 * Distributed under the terms of the MIT license.
5 * Author(s):
6 * Jérôme Duval
7 */
10 #include <syscalls.h>
12 #include <errno.h>
13 #include <pthread.h>
14 #include <signal.h>
16 #include <errno_private.h>
19 int
20 pause(void)
22 sigset_t mask;
23 sigemptyset(&mask);
25 __set_errno(_kern_sigsuspend(&mask));
27 pthread_testcancel();
29 return -1;