* 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:
@@ -13,6 +13,7 @@ MergeObject posix_signal.o :
|
|||||||
sigaltstack.c
|
sigaltstack.c
|
||||||
sighold.cpp
|
sighold.cpp
|
||||||
sigignore.cpp
|
sigignore.cpp
|
||||||
|
siginterrupt.cpp
|
||||||
signal.c
|
signal.c
|
||||||
sigpause.cpp
|
sigpause.cpp
|
||||||
sigpending.c
|
sigpending.c
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009, Axel Dörfler, [email protected]. 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);
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user