X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Fri, 15 Feb 2008 10:45:47 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: signals of type SIGSEGV handled only once (in multithreaded 	process)
Message-ID: <20080215094547.GU25954@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <20080215083751.535E978014@ems008.s.etech.sk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20080215083751.535E978014@ems008.s.etech.sk>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Feb 15 09:37, 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,

This patch was necessary to get SEHs (and so Cygwin) working correctly
on Windows 2008 Server.  The new behaviour is covered by POSIX:

http://www.opengroup.org/onlinepubs/009695399/functions/signal.html

  "If and when the function returns, if the value of sig was SIGFPE,
   SIGILL, or SIGSEGV or any other implementation-defined value
   corresponding to a computational exception, the behavior is undefined.
   Otherwise, the program shall resume execution at the point it was
   interrupted."


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

