diff options
author | Tobias Brunner <tobias@strongswan.org> | 2015-09-17 17:52:14 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2015-10-29 15:38:37 +0100 |
commit | 858148092d1ef755cd40fea0169259e4ad3e9f02 (patch) | |
tree | 850f6521d1e5247290f6e4f958a00a481f9f3389 /src/charon-systemd/charon-systemd.c | |
parent | c6aa606a659704d4a4855a6ab1f698fada9dd77e (diff) | |
download | strongswan-858148092d1e.tar.bz2 strongswan-858148092d1e.tar.xz |
Replace usages of sigwait(3) with sigwaitinfo(2)
This is basically the same call, but it has the advantage of being
supported by FreeBSD's valgrind, which sigwait() is not.
References #1106.
Diffstat (limited to 'src/charon-systemd/charon-systemd.c')
-rw-r--r-- | src/charon-systemd/charon-systemd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/charon-systemd/charon-systemd.c b/src/charon-systemd/charon-systemd.c index e391a5397..5b43831a4 100644 --- a/src/charon-systemd/charon-systemd.c +++ b/src/charon-systemd/charon-systemd.c @@ -249,10 +249,10 @@ static int run() while (TRUE) { - int sig, error; + int sig; - error = sigwait(&set, &sig); - if (error) + sig = sigwaitinfo(&set, NULL); + if (sig == -1) { DBG1(DBG_DMN, "waiting for signal failed: %s", strerror(error)); return SS_RC_INITIALIZATION_FAILED; @@ -393,7 +393,7 @@ int main(int argc, char *argv[]) } /* add handler for SEGV and ILL, - * INT, TERM and HUP are handled by sigwait() in run() */ + * INT, TERM and HUP are handled by sigwaitinfo() in run() */ action.sa_handler = segv_handler; action.sa_flags = 0; sigemptyset(&action.sa_mask); |