This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Fw: siginterrupt() call implementation
- From: "Sergey Okhapkin" <sos at prospect dot com dot ru>
- To: "Cygwin-Patches" <cygwin-patches at cygwin dot com>
- Date: Fri, 15 Nov 2002 13:13:57 -0500
- Subject: Fw: siginterrupt() call implementation
I apologise for sending a patch to a wrong list.
Sergey Okhapkin
Somerset, NJ
----- Original Message -----
From: "Sergey Okhapkin" <sos@prospect.com.ru>
To: <cygwin-developers@cygwin.com>
Sent: Thursday, November 14, 2002 9:35 PM
Subject: siginterrupt() call implementation
> The patch implements siginterrupt(3) library function.
>
> 2002-11-14 Sergey Okhapkin <sos@prospect.com.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
>
>