Patch by Vasilis Kaoutsis: Added sigpause().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25682 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-05-28 15:28:49 +00:00
parent 3023ab11f7
commit d46a010c43
3 changed files with 24 additions and 0 deletions

View File

@ -171,6 +171,7 @@ int sigismember(const sigset_t *set, int signo);
int sigignore(int signo); int sigignore(int signo);
int sighold(int signo); int sighold(int signo);
int sigrelse(int signo); int sigrelse(int signo);
int sigpause(int signo);
const char *strsignal(int sig); const char *strsignal(int sig);

View File

@ -14,6 +14,7 @@ MergeObject posix_signal.o :
sighold.cpp sighold.cpp
sigignore.cpp sigignore.cpp
signal.c signal.c
sigpause.cpp
sigpending.c sigpending.c
sigprocmask.c sigprocmask.c
sigrelse.cpp sigrelse.cpp

View File

@ -0,0 +1,22 @@
/*
* Copyright 2008, Vasilis Kaoutsis, kaoutsis@sch.gr
* Distributed under the terms of the MIT License.
*/
#include <signal.h>
int
sigpause(int signal)
{
sigset_t processSignalSet;
if (sigprocmask(SIG_SETMASK, NULL, &processSignalSet) == -1)
return -1;
if (sigdelset(&processSignalSet, signal) == -1)
return -1;
return sigsuspend(&processSignalSet);
}