Mail Archives: cygwin-developers/2002/11/14/21:37:50
The patch implements siginterrupt(3) library function.
2002-11-14 Sergey Okhapkin <sos AT prospect DOT com DOT ru>
* cygwin.din (siginterrupt): New export.
* signal.cc (siginterrupt): New.
Index: cygwin.din
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/cygwin.din,v
retrieving revision 1.67
diff -u -p -r1.67 cygwin.din
--- cygwin.din 7 Nov 2002 09:08:39 -0000 1.67
+++ cygwin.din 15 Nov 2002 02:31:50 -0000
@@ -740,6 +740,8 @@ sigemptyset
_sigemptyset = sigemptyset
sigfillset
_sigfillset = sigfillset
+siginterrupt
+_siginterrupt = siginterrupt
signal
_signal = signal
significand
Index: signal.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/signal.cc,v
retrieving revision 1.36
diff -u -p -r1.36 signal.cc
--- signal.cc 20 Oct 2002 04:15:50 -0000 1.36
+++ signal.cc 15 Nov 2002 02:31:51 -0000
@@ -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);
+}
+
Sergey Okhapkin
Somerset, NJ
- Raw text -