From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12337 invoked by alias); 24 Nov 2011 06:20:04 -0000 Received: (qmail 12240 invoked by uid 22791); 24 Nov 2011 06:20:02 -0000 X-SWARE-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-qw0-f48.google.com (HELO mail-qw0-f48.google.com) (209.85.216.48) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Nov 2011 06:19:44 +0000 Received: by qady1 with SMTP id y1so990826qad.0 for ; Wed, 23 Nov 2011 22:19:43 -0800 (PST) Received: by 10.224.215.73 with SMTP id hd9mr12238198qab.94.1322115583282; Wed, 23 Nov 2011 22:19:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.215.73 with SMTP id hd9mr12238190qab.94.1322115583123; Wed, 23 Nov 2011 22:19:43 -0800 (PST) Received: by 10.224.6.76 with HTTP; Wed, 23 Nov 2011 22:19:43 -0800 (PST) In-Reply-To: <8339de9npv.fsf@gnu.org> References: <20111124000052.14DC12461B1@ruffy.mtv.corp.google.com> <8339de9npv.fsf@gnu.org> Date: Thu, 24 Nov 2011 06:20:00 -0000 Message-ID: Subject: Re: [RFC] Don't immediately SIGTERM the child of "target remote |". From: Doug Evans To: Eli Zaretskii Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-11/txt/msg00674.txt.bz2 On Wed, Nov 23, 2011 at 7:57 PM, Eli Zaretskii wrote: >> Date: Wed, 23 Nov 2011 16:00:51 -0800 (PST) >> From: dje@google.com (Doug Evans) >> >> +#if defined (HAVE_SIGACTION) && defined (SA_RESTART) >> + =A0 =A0 =A0{ >> + =A0 =A0 struct sigaction sa, osa; >> + =A0 =A0 sa.sa_handler =3D sigalrm_handler; >> + =A0 =A0 sigemptyset (&sa.sa_mask); >> + =A0 =A0 sa.sa_flags =3D 0; >> + =A0 =A0 sigaction (SIGALRM, &sa, &osa); >> + =A0 =A0 ofunc =3D osa.sa_handler; >> + =A0 =A0 =A0} >> +#else >> + =A0 =A0 =A0ofunc =3D (void (*)()) signal (SIGALRM, sigalrm_handler); >> +#endif > > SIGALRM may not be defined (e.g., on MS-Windows). > Thanks. That's easy enough to #ifdef around. [Things could work as they do today #ifndef SIGALRM.]