diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2015-11-26 15:26:42 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2015-11-26 15:26:42 +0100 |
commit | f42f239a632306ed082f6fde878977248eea85cf (patch) | |
tree | 6b6f55133d62cd206d1ad487c28215386bfae75c /src/libstrongswan/utils | |
parent | 6f35bf8f3833c3530d0ccec0f68bee97d0f00ebe (diff) | |
download | vyos-strongswan-f42f239a632306ed082f6fde878977248eea85cf.tar.gz vyos-strongswan-f42f239a632306ed082f6fde878977248eea85cf.zip |
Imported Upstream version 5.3.5
Diffstat (limited to 'src/libstrongswan/utils')
-rw-r--r-- | src/libstrongswan/utils/utils.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstrongswan/utils/utils.c b/src/libstrongswan/utils/utils.c index 47d72ee98..40cb43d90 100644 --- a/src/libstrongswan/utils/utils.c +++ b/src/libstrongswan/utils/utils.c @@ -124,7 +124,10 @@ void wait_sigint() sigaddset(&set, SIGTERM); sigprocmask(SIG_BLOCK, &set, NULL); - sigwaitinfo(&set, NULL); + while (sigwaitinfo(&set, NULL) == -1 && errno == EINTR) + { + /* wait for signal */ + } } #ifndef HAVE_SIGWAITINFO @@ -167,7 +170,7 @@ void closefrom(int low_fd) dir_fd = open("/proc/self/fd", O_RDONLY); if (dir_fd != -1) { - while ((len = syscall(SYS_getdents64, dir_fd, buffer, + while ((len = syscall(__NR_getdents64, dir_fd, buffer, sizeof(buffer))) > 0) { for (offset = 0; offset < len; offset += entry->d_reclen) |