delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/02/15/13:55:00

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 15 Feb 2008 13:54:26 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: signals of type SIGSEGV handled only once (in multithreaded process)
Message-ID: <20080215185426.GA17821@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20080215083751 DOT 535E978014 AT ems008 DOT s DOT etech DOT sk>
MIME-Version: 1.0
In-Reply-To: <20080215083751.535E978014@ems008.s.etech.sk>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

On Fri, Feb 15, 2008 at 09:37:51AM +0100, klement2 wrote:
>After excellently quick correction of pthread_kill when the argument
>signal is zero
>(by cgf), I have found another problem related to signal handling. The
>code in attachment
>demonstrates it ( because of pthread_kill, it must be run with
>cygwin1-20080213.dll and newer ).
>It seams that signal handlers for signals like SIGSEGV, SIGFPE are
>called only once,
>and the default handler is called for the second time the signal occures
>in the process.
>I'm not sure if the example is reasonable (e.g. pthread_exit in signal
>handler...),
>but works as expected on linux.
>
>Output from the example compiled and run in linux:
>
>Starting SIGSEGV1...
>tid1=b7f1abb0
>Sigaction success, errno = 0
>Join1                ---> Result: 0, xx=8
>Ret. value           ---> Result: 8, xx=8
>Good thread create   ---> Result: 0, xx=8
>Starting SIGSEGV2...
>tid2=b7519bb0
>Sigaction success, errno = 0
><--------------------------- this is the end in cygwin (crash info
>message)------------
>xx=9
>Join2                ---> Result: 0, xx=9
>Ret. value           ---> Result: 9, xx=9

I made some changes (after receiving some insight from Corinna) and,
AFAICT, the latest snapshot matches the above linux behavior.

cgf

--
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