summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-12-19 14:41:47 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-12-19 14:41:47 +0000
commit3ea44b524a05c1b771b678d3da127211177322eb (patch)
tree30e64988b1cda34cc63feaa9229a9bcf73c6da8b
parent53c9e2ec3dd78e2612d191249e3961bf9625d453 (diff)
downloads6-networking-3ea44b524a05c1b771b678d3da127211177322eb.tar.xz
Safewrap around iopause in UCSPI servers!
-rw-r--r--src/conn-tools/s6-ipcserver.c2
-rw-r--r--src/conn-tools/s6-tcpserver4.c2
-rw-r--r--src/conn-tools/s6-tcpserver6.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/conn-tools/s6-ipcserver.c b/src/conn-tools/s6-ipcserver.c
index 99c12a0..587e1bb 100644
--- a/src/conn-tools/s6-ipcserver.c
+++ b/src/conn-tools/s6-ipcserver.c
@@ -407,7 +407,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
while (cont)
{
- if (iopause(x, 1 + (numconn < maxconn), 0, 0) == -1)
+ if (iopause_g(x, 1 + (numconn < maxconn), 0, 0) < 0)
strerr_diefu1sys(111, "iopause") ;
if (x[0].revents & IOPAUSE_EXCEPT) strerr_dief1x(111, "trouble with selfpipe") ;
diff --git a/src/conn-tools/s6-tcpserver4.c b/src/conn-tools/s6-tcpserver4.c
index 5bb7c77..a0d8e61 100644
--- a/src/conn-tools/s6-tcpserver4.c
+++ b/src/conn-tools/s6-tcpserver4.c
@@ -378,7 +378,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
pidip = inyostack ; ipnum = inyostack + maxconn ;
while (cont)
{
- if (iopause(x, 1 + (numconn < maxconn), 0, 0) == -1)
+ if (iopause_g(x, 1 + (numconn < maxconn), 0, 0) < 0)
strerr_diefu1sys(111, "iopause") ;
if (x[0].revents & IOPAUSE_EXCEPT) strerr_dief1x(111, "trouble with selfpipe") ;
diff --git a/src/conn-tools/s6-tcpserver6.c b/src/conn-tools/s6-tcpserver6.c
index cbfbf2a..4a4e7d3 100644
--- a/src/conn-tools/s6-tcpserver6.c
+++ b/src/conn-tools/s6-tcpserver6.c
@@ -378,7 +378,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
pidip = inyostack ; ipnum = inyostack + maxconn ;
while (cont)
{
- if (iopause(x, 1 + (numconn < maxconn), 0, 0) == -1)
+ if (iopause_g(x, 1 + (numconn < maxconn), 0, 0) < 0)
strerr_diefu1sys(111, "iopause") ;
if (x[0].revents & IOPAUSE_EXCEPT) strerr_dief1x(111, "trouble with selfpipe") ;