[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 07/15] virsh: Handle absence of SA_SIGINFO



2010/4/7 Daniel P. Berrange <berrange redhat com>:
> On Mon, Mar 22, 2010 at 02:25:37AM +0100, Matthias Bolte wrote:
>> MinGW and gnulib don't provide SA_SIGINFO on Windows.
>> ---
>>  tools/virsh.c |    4 ++++
>>  1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/tools/virsh.c b/tools/virsh.c
>> index 32895b2..1c932bd 100644
>> --- a/tools/virsh.c
>> +++ b/tools/virsh.c
>> @@ -411,11 +411,13 @@ static int disconnected = 0; /* we may have been disconnected */
>>   * We get here when a SIGPIPE is being raised, we can't do much in the
>>   * handler, just save the fact it was raised
>>   */
>> +#ifdef SA_SIGINFO
>>  static void vshCatchDisconnect(int sig, siginfo_t * siginfo,
>>                                 void* context ATTRIBUTE_UNUSED) {
>>      if ((sig == SIGPIPE) || (siginfo->si_signo == SIGPIPE))
>>          disconnected++;
>>  }
>> +#endif
>>
>>  /*
>>   * vshSetupSignals:
>> @@ -425,6 +427,7 @@ static void vshCatchDisconnect(int sig, siginfo_t * siginfo,
>>   */
>>  static void
>>  vshSetupSignals(void) {
>> +#ifdef SA_SIGINFO
>>      struct sigaction sig_action;
>>
>>      sig_action.sa_sigaction = vshCatchDisconnect;
>> @@ -432,6 +435,7 @@ vshSetupSignals(void) {
>>      sigemptyset(&sig_action.sa_mask);
>>
>>      sigaction(SIGPIPE, &sig_action, NULL);
>> +#endif
>>  }
>>
>>  /*
>> --
>
> THis patch doesn't appear to have been pushed...
>
>
> Regards,
> Daniel
>

You already included this into your "Fix Win32 portability problems"
patch. so this patch is not necessary anymore.

Matthias


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]