delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/12/02/21:40:35

X-Spam-Check-By: sourceware.org
X-T2-Posting-ID: dCnToGxhL58ot4EWY8b+QGwMembwLoz1X2yB7MdtIiA=
X-Cloudmark-Score: 0.000000 []
Date: Sat, 3 Dec 2005 03:37:32 +0100
From: Samuel Thibault <samuel DOT thibault AT ens-lyon DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: SA_SIGINFO and signal info ?
Message-ID: <20051203023731.GU10913@bouh.residence.ens-lyon.fr>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20051202230909 DOT GM10913 AT bouh DOT residence DOT ens-lyon DOT fr> <Pine DOT GSO DOT 4 DOT 63 DOT 0512021855380 DOT 8881 AT slinky DOT cs DOT nyu DOT edu> <20051203001911 DOT GQ10913 AT bouh DOT residence DOT ens-lyon DOT fr> <20051203003415 DOT GR10913 AT bouh DOT residence DOT ens-lyon DOT fr> <Pine DOT GSO DOT 4 DOT 63 DOT 0512022016060 DOT 8881 AT slinky DOT cs DOT nyu DOT edu>
Mime-Version: 1.0
In-Reply-To: <Pine.GSO.4.63.0512022016060.8881@slinky.cs.nyu.edu>
User-Agent: Mutt/1.5.9i-nntp
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hi,

Igor Pechtchanski, le Fri 02 Dec 2005 20:16:58 -0500, a écrit :
> On Sat, 3 Dec 2005, Samuel Thibault wrote:
> 
> > [snip]
> > So SI_USER should rather be defined to 0.
> > Mmm, btw, SIGALRM sets 0 in si_code, while it should set SI_KERNEL.
> 
> A clear case of <http://cygwin.com/acronyms/#PTC>...

The following patch works.
pthread_kill()'s issue seems trickier.

Regards,
Samuel

Index: cygwin/timer.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/timer.cc,v
retrieving revision 1.19
diff -u -r1.19 timer.cc
--- cygwin/timer.cc	11 Nov 2005 16:42:15 -0000	1.19
+++ cygwin/timer.cc	3 Dec 2005 02:38:47 -0000
@@ -167,6 +167,7 @@
 	    siginfo_t si;
 	    memset (&si, 0, sizeof (si));
 	    si.si_signo = tt->evp.sigev_signo;
+	    si.si_code = SI_KERNEL;
 	    si.si_sigval.sival_ptr = tt->evp.sigev_value.sival_ptr;
 	    debug_printf ("%p sending sig %d", x, tt->evp.sigev_signo);
 	    sig_send (myself_nowait, si);
Index: cygwin/include/cygwin/signal.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/cygwin/signal.h,v
retrieving revision 1.8
diff -u -r1.8 signal.h
--- cygwin/include/cygwin/signal.h	10 Nov 2005 09:12:22 -0000	1.8
+++ cygwin/include/cygwin/signal.h	3 Dec 2005 02:38:48 -0000
@@ -102,7 +102,7 @@
 
 enum
 {
-  SI_USER = 1,				/* sent by kill, raise, pthread_kill */
+  SI_USER = 0,				/* sent by kill, raise, pthread_kill */
   SI_ASYNCIO,				/* sent by AIO completion (currently
 					   unimplemented) */
   SI_MESGQ,				/* sent by real time mesq state change

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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