Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-11-15 22:04:36 +0300
committerChristopher Faylor <me@cgf.cx>2002-11-15 22:04:36 +0300
commitf319cb1ad3062aaaa78a4da95e9ee90278d8ec33 (patch)
tree1d10126e7dafe3efd675a04a3bd9af96a97607eb /winsup/cygwin/signal.cc
parent4b9ddc7dc9901970ca84b12289ba5d274cd15f3d (diff)
* include/cygwin/version.h: Bump API_MINOR to accommodate below changes.
* cygwin.din (siginterrupt): New export. * signal.cc (siginterrupt): New.
Diffstat (limited to 'winsup/cygwin/signal.cc')
-rw-r--r--winsup/cygwin/signal.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index 382a8a2ec..9c807f4ef 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -407,3 +407,16 @@ pause (void)
{
return handle_sigsuspend (myself->getsigmask ());
}
+
+extern "C" int
+siginterrupt (int sig, int flag)
+{
+ struct sigaction act;
+ (void)sigaction(sig, NULL, &act);
+ if (flag)
+ act.sa_flags &= ~SA_RESTART;
+ else
+ act.sa_flags |= SA_RESTART;
+ return sigaction(sig, &act, NULL);
+}
+