Re: [RFC] Don't immediately SIGTERM the child of "target remote |".

Doug Evans
2011-11-24T06:20:04Z

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.]