]> xenbits.xensource.com Git - libvirt.git/commitdiff
virFork: placate static analyzers: ignore pthread_sigmask return value
authorJim Meyering <meyering@redhat.com>
Fri, 19 Feb 2010 17:40:14 +0000 (18:40 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 23 Feb 2010 16:43:33 +0000 (17:43 +0100)
* src/util/util.c: Include "ignore-value.h".
(virFork): We really do want to ignore pthread_sigmask failure.

src/util/util.c

index 624e5702455688a064f8276ee387f21cfce34031..cf7bba5d5da1006b1604c61ddc711f56b1ef111d 100644 (file)
@@ -69,6 +69,7 @@
 #include "virterror_internal.h"
 #include "logging.h"
 #include "event.h"
+#include "ignore-value.h"
 #include "buf.h"
 #include "util.h"
 #include "memory.h"
@@ -344,7 +345,7 @@ int virFork(pid_t *pid) {
     if (*pid < 0) {
         /* attempt to restore signal mask, but ignore failure, to
            avoid obscuring the fork failure */
-        pthread_sigmask(SIG_SETMASK, &oldmask, NULL);
+        ignore_value (pthread_sigmask(SIG_SETMASK, &oldmask, NULL));
         virReportSystemError(saved_errno,
                              "%s", _("cannot fork child process"));
         goto cleanup;