* 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:
parent
095f2c0e21
commit
d5ec380523
@ -13,6 +13,7 @@ MergeObject posix_signal.o :
|
||||
sigaltstack.c
|
||||
sighold.cpp
|
||||
sigignore.cpp
|
||||
siginterrupt.cpp
|
||||
signal.c
|
||||
sigpause.cpp
|
||||
sigpending.c
|
||||
|
25
src/system/libroot/posix/signal/siginterrupt.cpp
Normal file
25
src/system/libroot/posix/signal/siginterrupt.cpp
Normal 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user