Patch by Vasilis Kaoutsis: Implemented sigrelse().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22865 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c84c58e41a
commit
99ed286c94
@ -165,6 +165,7 @@ int sigdelset(sigset_t *set, int signo);
|
||||
int sigismember(const sigset_t *set, int signo);
|
||||
int sigignore(int signo);
|
||||
int sighold(int signo);
|
||||
int sigrelse(int signo);
|
||||
|
||||
const char *strsignal(int sig);
|
||||
|
||||
|
@ -15,6 +15,7 @@ MergeObject posix_signal.o :
|
||||
signal.c
|
||||
sigpending.c
|
||||
sigprocmask.c
|
||||
sigrelse.cpp
|
||||
sigset.c
|
||||
sigsuspend.c
|
||||
strsignal.c
|
||||
|
22
src/system/libroot/posix/signal/sigrelse.cpp
Normal file
22
src/system/libroot/posix/signal/sigrelse.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2007, Vasilis Kaoutsis, kaoutsis@sch.gr
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
int
|
||||
sigrelse(int signal)
|
||||
{
|
||||
// make an empty set
|
||||
// and add the signal
|
||||
sigset_t tempSignalSet;
|
||||
sigemptyset(&tempSignalSet);
|
||||
if (sigaddset(&tempSignalSet, signal) == -1)
|
||||
return -1;
|
||||
|
||||
// remove the signal from the calling process' signal mask
|
||||
return sigprocmask(SIG_UNBLOCK, &tempSignalSet, NULL);
|
||||
}
|
Loading…
Reference in New Issue
Block a user