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 |".
On Wed, Nov 23, 2011 at 7:57 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> 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).
>
Thanks. That's easy enough to #ifdef around.
[Things could work as they do today #ifndef SIGALRM.]