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:
parent
3023ab11f7
commit
d46a010c43
@ -171,6 +171,7 @@ int sigismember(const sigset_t *set, int signo);
|
||||
int sigignore(int signo);
|
||||
int sighold(int signo);
|
||||
int sigrelse(int signo);
|
||||
int sigpause(int signo);
|
||||
|
||||
const char *strsignal(int sig);
|
||||
|
||||
|
@ -14,6 +14,7 @@ MergeObject posix_signal.o :
|
||||
sighold.cpp
|
||||
sigignore.cpp
|
||||
signal.c
|
||||
sigpause.cpp
|
||||
sigpending.c
|
||||
sigprocmask.c
|
||||
sigrelse.cpp
|
||||
|
22
src/system/libroot/posix/signal/sigpause.cpp
Normal file
22
src/system/libroot/posix/signal/sigpause.cpp
Normal 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user