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:
Ingo Weinhold 2007-11-09 23:23:46 +00:00
parent c84c58e41a
commit 99ed286c94
3 changed files with 24 additions and 0 deletions

View File

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

View File

@ -15,6 +15,7 @@ MergeObject posix_signal.o :
signal.c
sigpending.c
sigprocmask.c
sigrelse.cpp
sigset.c
sigsuspend.c
strsignal.c

View 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);
}