[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



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
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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