delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2002/11/14/21:37:50

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Message-ID: <03cf01c28c4f$aa191230$0201a8c0@sos>
From: "Sergey Okhapkin" <sos AT prospect DOT com DOT ru>
To: <cygwin-developers AT cygwin DOT com>
Subject: siginterrupt() call implementation
Date: Thu, 14 Nov 2002 21:35:27 -0500
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by amavisd-milter (http://amavis.org/)

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019