* Added siginterrupt() function, this closes ticket #3263.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28854 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-01-07 19:40:53 +00:00
parent 095f2c0e21
commit d5ec380523
2 changed files with 26 additions and 0 deletions

View File

@ -13,6 +13,7 @@ MergeObject posix_signal.o :
sigaltstack.c
sighold.cpp
sigignore.cpp
siginterrupt.cpp
signal.c
sigpause.cpp
sigpending.c

View File

@ -0,0 +1,25 @@
/*
* Copyright 2009, Axel Dörfler, axeld@pinc-software.de. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#include <signal.h>
#include <syscalls.h>
extern "C" int
siginterrupt(int sig, int flag)
{
struct sigaction action;
sigaction(sig, NULL, &action);
if (flag)
action.sa_flags &= ~SA_RESTART;
else
action.sa_flags |= SA_RESTART;
return sigaction(sig, &action, NULL);
}