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 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);
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
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