From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25335 invoked by alias); 9 May 2003 12:49:22 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 25319 invoked from network); 9 May 2003 12:49:20 -0000 Received: from unknown (HELO mail.jlokier.co.uk) (81.29.64.88) by sources.redhat.com with SMTP; 9 May 2003 12:49:20 -0000 Received: from mail.jlokier.co.uk (localhost [127.0.0.1]) by mail.jlokier.co.uk (8.12.8/8.12.8) with ESMTP id h49CnK6R025662; Fri, 9 May 2003 13:49:20 +0100 Received: (from jamie@localhost) by mail.jlokier.co.uk (8.12.8/8.12.8/Submit) id h49CnKJW025660; Fri, 9 May 2003 13:49:20 +0100 Date: Fri, 09 May 2003 12:49:00 -0000 From: Jamie Lokier To: Andrew Haley Cc: Ranjit Mathew , gcc@gcc.gnu.org Subject: Re: __attribute__((cleanup(function)) versus try/finally Message-ID: <20030509124920.GC25569@mail.jlokier.co.uk> References: <16059.32748.60695.113159@cuddles.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16059.32748.60695.113159@cuddles.redhat.com> User-Agent: Mutt/1.4.1i X-SW-Source: 2003-05/txt/msg00885.txt.bz2 Andrew Haley wrote: > > 1. Linux does not care if the signal handler returns or not (unlike > > Windows). > > Actually, the C standard is quite explicit about this: signal handlers > may return either by a return statement of calling longjmp(). Maybe > the Windows version of longjmp() does some magic to make this work. Last time I tried it (a few years ago now), longjmp() out of a signal handler which is interrupting a select() system call crashed Cygwin. So, I had to use a different strategy for picking up SIGCHLD events on that platform - limiting select() calls to a maximum timeout of a few seconds. -- Jamie