This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Don't immediately SIGTERM the child of "target remote |".
- From: Eli Zaretskii <eliz at gnu dot org>
- To: dje at google dot com (Doug Evans)
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 24 Nov 2011 05:57:32 +0200
- Subject: Re: [RFC] Don't immediately SIGTERM the child of "target remote |".
- References: <20111124000052.14DC12461B1@ruffy.mtv.corp.google.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Wed, 23 Nov 2011 16:00:51 -0800 (PST)
> From: dje@google.com (Doug Evans)
>
> +#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
> + {
> + struct sigaction sa, osa;
> + sa.sa_handler = sigalrm_handler;
> + sigemptyset (&sa.sa_mask);
> + sa.sa_flags = 0;
> + sigaction (SIGALRM, &sa, &osa);
> + ofunc = osa.sa_handler;
> + }
> +#else
> + ofunc = (void (*)()) signal (SIGALRM, sigalrm_handler);
> +#endif
SIGALRM may not be defined (e.g., on MS-Windows).