summaryrefslogtreecommitdiff
path: root/src/charon-nm
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2015-11-18 14:49:27 +0100
committerYves-Alexis Perez <corsac@debian.org>2015-11-18 14:49:27 +0100
commit1e980d6be0ef0e243c6fe82b5e855454b97e24a4 (patch)
tree0d59eec2ce2ed332434ae80fc78a44db9ad293c5 /src/charon-nm
parent5dca9ea0e2931f0e2a056c7964d311bcc30a01b8 (diff)
downloadvyos-strongswan-1e980d6be0ef0e243c6fe82b5e855454b97e24a4.tar.gz
vyos-strongswan-1e980d6be0ef0e243c6fe82b5e855454b97e24a4.zip
Imported Upstream version 5.3.4
Diffstat (limited to 'src/charon-nm')
-rw-r--r--src/charon-nm/charon-nm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/charon-nm/charon-nm.c b/src/charon-nm/charon-nm.c
index 80551f853..1773e7c39 100644
--- a/src/charon-nm/charon-nm.c
+++ b/src/charon-nm/charon-nm.c
@@ -18,6 +18,7 @@
#include <signal.h>
#include <sys/types.h>
#include <unistd.h>
+#include <errno.h>
#include <hydra.h>
#include <daemon.h>
@@ -80,12 +81,11 @@ static void run()
while (TRUE)
{
int sig;
- int error;
- error = sigwait(&set, &sig);
- if (error)
+ sig = sigwaitinfo(&set, NULL);
+ if (sig == -1)
{
- DBG1(DBG_DMN, "error %d while waiting for a signal", error);
+ DBG1(DBG_DMN, "waiting for signal failed: %s", strerror(errno));
return;
}
switch (sig)
@@ -237,7 +237,7 @@ int main(int argc, char *argv[])
}
/* add handler for SEGV and ILL,
- * INT and TERM are handled by sigwait() in run() */
+ * INT and TERM are handled by sigwaitinfo() in run() */
action.sa_handler = segv_handler;
action.sa_flags = 0;
sigemptyset(&action.sa_mask);