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

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

 



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
 }
 
 /*
-- 
1.6.3.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]