diff options
Diffstat (limited to 'src/conn-tools')
-rw-r--r-- | src/conn-tools/s6-ioconnect.c | 10 | ||||
-rw-r--r-- | src/conn-tools/s6-ipcclient.c | 2 | ||||
-rw-r--r-- | src/conn-tools/s6-ipcserver-access.c | 2 | ||||
-rw-r--r-- | src/conn-tools/s6-ipcserver-socketbinder.c | 2 | ||||
-rw-r--r-- | src/conn-tools/s6-ipcserver.c | 2 | ||||
-rw-r--r-- | src/conn-tools/s6-ipcserverd.c | 7 | ||||
-rw-r--r-- | src/conn-tools/s6-sudo.c | 2 | ||||
-rw-r--r-- | src/conn-tools/s6-sudoc.c | 8 | ||||
-rw-r--r-- | src/conn-tools/s6-sudod.c | 8 |
9 files changed, 21 insertions, 22 deletions
diff --git a/src/conn-tools/s6-ioconnect.c b/src/conn-tools/s6-ioconnect.c index b838162..7fab16e 100644 --- a/src/conn-tools/s6-ioconnect.c +++ b/src/conn-tools/s6-ioconnect.c @@ -73,11 +73,11 @@ static void handle_signals (void) int main (int argc, char const *const *argv) { - tain_t tto ; + tain tto ; unsigned int i, j ; PROG = "s6-ioconnect" ; { - subgetopt_t l = SUBGETOPT_ZERO ; + subgetopt l = SUBGETOPT_ZERO ; unsigned int t = 0 ; for (;;) { @@ -105,16 +105,16 @@ int main (int argc, char const *const *argv) if (ndelay_on(a[i][j].fd) == -1) strerr_diefu1sys(111, "ndelay_on") ; if (!iobuffer_init(&b[i], a[i][0].fd, a[i][1].fd)) strerr_diefu1sys(111, "iobuffer_init") ; } - if (sig_ignore(SIGPIPE) == -1) strerr_diefu1sys(111, "sig_ignore") ; + if (!sig_ignore(SIGPIPE)) strerr_diefu1sys(111, "sig_ignore") ; tain_now_set_stopwatch_g() ; x[0].fd = selfpipe_init() ; if (x[0].fd < 0) strerr_diefu1sys(111, "selfpipe_init") ; - if (selfpipe_trap(SIGTERM) < 0) + if (!selfpipe_trap(SIGTERM)) strerr_diefu1sys(111, "trap SIGTERM") ; for (;;) { - tain_t deadline ; + tain deadline ; unsigned int xlen = 1 ; int r ; diff --git a/src/conn-tools/s6-ipcclient.c b/src/conn-tools/s6-ipcclient.c index 1ec68dd..df21a2f 100644 --- a/src/conn-tools/s6-ipcclient.c +++ b/src/conn-tools/s6-ipcclient.c @@ -17,7 +17,7 @@ int main (int argc, char const *const *argv) unsigned int verbosity = 1 ; PROG = "s6-ipcclient" ; { - subgetopt_t l = SUBGETOPT_ZERO ; + subgetopt l = SUBGETOPT_ZERO ; for (;;) { int opt = subgetopt_r(argc, argv, "qQvp:l:", &l) ; diff --git a/src/conn-tools/s6-ipcserver-access.c b/src/conn-tools/s6-ipcserver-access.c index a5c2bd7..7efb215 100644 --- a/src/conn-tools/s6-ipcserver-access.c +++ b/src/conn-tools/s6-ipcserver-access.c @@ -125,7 +125,7 @@ int main (int argc, char const *const *argv) int doenv = 1 ; PROG = "s6-ipcserver-access" ; { - subgetopt_t l = SUBGETOPT_ZERO ; + subgetopt l = SUBGETOPT_ZERO ; for (;;) { int opt = subgetopt_r(argc, argv, "v:Eel:i:x:", &l) ; diff --git a/src/conn-tools/s6-ipcserver-socketbinder.c b/src/conn-tools/s6-ipcserver-socketbinder.c index ce63830..28c5506 100644 --- a/src/conn-tools/s6-ipcserver-socketbinder.c +++ b/src/conn-tools/s6-ipcserver-socketbinder.c @@ -24,7 +24,7 @@ int main (int argc, char const *const *argv) unsigned int perms = 0777 ; PROG = "s6-ipcserver-socketbinder" ; { - subgetopt_t l = SUBGETOPT_ZERO ; + subgetopt l = SUBGETOPT_ZERO ; for (;;) { int opt = subgetopt_r(argc, argv, "DdMmBb:a:", &l) ; diff --git a/src/conn-tools/s6-ipcserver.c b/src/conn-tools/s6-ipcserver.c index aa707fc..ff28501 100644 --- a/src/conn-tools/s6-ipcserver.c +++ b/src/conn-tools/s6-ipcserver.c @@ -30,7 +30,7 @@ int main (int argc, char const *const *argv) unsigned int socketperms = 0777 ; PROG = "s6-ipcserver" ; { - subgetopt_t l = SUBGETOPT_ZERO ; + subgetopt l = SUBGETOPT_ZERO ; for (;;) { int opt = subgetopt_r(argc, argv, "qQvDd1UPpc:C:b:a:u:g:G:", &l) ; diff --git a/src/conn-tools/s6-ipcserverd.c b/src/conn-tools/s6-ipcserverd.c index 1a4a2d1..3ef4ded 100644 --- a/src/conn-tools/s6-ipcserverd.c +++ b/src/conn-tools/s6-ipcserverd.c @@ -286,7 +286,6 @@ static void new_connection (int s, char const *remotepath, char const *const *ar else if (!pid) { selfpipe_finish() ; - sig_restore(SIGPIPE) ; run_child(s, uid, gid, num+1, remotepath, argv) ; } @@ -311,7 +310,7 @@ int main (int argc, char const *const *argv) iopause_fd x[2] = { { .events = IOPAUSE_READ }, { .fd = 0, .events = IOPAUSE_READ | IOPAUSE_EXCEPT } } ; PROG = "s6-ipcserverd" ; { - subgetopt_t l = SUBGETOPT_ZERO ; + subgetopt l = SUBGETOPT_ZERO ; int flag1 = 0 ; for (;;) { @@ -348,7 +347,7 @@ int main (int argc, char const *const *argv) x[0].fd = selfpipe_init() ; if (x[0].fd == -1) strerr_diefu1sys(111, "create selfpipe") ; - if (sig_ignore(SIGPIPE) < 0) strerr_diefu1sys(111, "ignore SIGPIPE") ; + if (!sig_altignore(SIGPIPE)) strerr_diefu1sys(111, "ignore SIGPIPE") ; { sigset_t set ; sigemptyset(&set) ; @@ -357,7 +356,7 @@ int main (int argc, char const *const *argv) sigaddset(&set, SIGHUP) ; sigaddset(&set, SIGQUIT) ; sigaddset(&set, SIGABRT) ; - if (selfpipe_trapset(&set) < 0) strerr_diefu1sys(111, "trap signals") ; + if (!selfpipe_trapset(&set)) strerr_diefu1sys(111, "trap signals") ; } fmtlocalmaxconn[1+uint_fmt(fmtlocalmaxconn+1, localmaxconn)] = 0 ; diff --git a/src/conn-tools/s6-sudo.c b/src/conn-tools/s6-sudo.c index 6120004..96d0ea0 100644 --- a/src/conn-tools/s6-sudo.c +++ b/src/conn-tools/s6-sudo.c @@ -18,7 +18,7 @@ int main (int argc, char const *const *argv) int nodoenv = 0 ; PROG = "s6-sudo" ; { - subgetopt_t l = SUBGETOPT_ZERO ; + subgetopt l = SUBGETOPT_ZERO ; for (;;) { int opt = subgetopt_r(argc, argv, "qQvp:l:et:T:", &l) ; diff --git a/src/conn-tools/s6-sudoc.c b/src/conn-tools/s6-sudoc.c index fe6af5d..6d923df 100644 --- a/src/conn-tools/s6-sudoc.c +++ b/src/conn-tools/s6-sudoc.c @@ -29,12 +29,12 @@ int main (int argc, char const *const *argv, char const *const *envp) { char buf6[64] ; buffer b6 = BUFFER_INIT(&buffer_read, 6, buf6, 64) ; - unixmessage_sender_t b7 = UNIXMESSAGE_SENDER_INIT(7) ; - subgetopt_t l = SUBGETOPT_ZERO ; + unixmessage_sender b7 = UNIXMESSAGE_SENDER_INIT(7) ; + subgetopt l = SUBGETOPT_ZERO ; unsigned int t = 0, T = 0 ; int doenv = 1 ; - tain_t deadline = TAIN_INFINITE_RELATIVE ; + tain deadline = TAIN_INFINITE_RELATIVE ; PROG = "s6-sudoc" ; for (;;) { @@ -76,7 +76,7 @@ int main (int argc, char const *const *argv, char const *const *envp) { .iov_base = pack, .iov_len = 16 }, { .iov_base = 0, .iov_len = 0 }, { .iov_base = 0, .iov_len = 0 } } ; - unixmessage_v_t mv = { .v = v, .vlen = 4, .fds = fds, .nfds = 3 } ; + unixmessagev mv = { .v = v, .vlen = 4, .fds = fds, .nfds = 3 } ; stralloc sa = STRALLOC_ZERO ; size_t envlen = doenv ? env_len(envp) : 0 ; uint32_pack_big(pack, (uint32_t)argc) ; diff --git a/src/conn-tools/s6-sudod.c b/src/conn-tools/s6-sudod.c index 34904ac..6bf403c 100644 --- a/src/conn-tools/s6-sudod.c +++ b/src/conn-tools/s6-sudod.c @@ -61,17 +61,17 @@ static int handle_signals (pid_t pid, int *wstat) int main (int argc, char const *const *argv, char const *const *envp) { iopause_fd x[2] = { { .events = IOPAUSE_READ }, { .fd = 0, .events = 0, .revents = 0 } } ; - unixmessage_t m ; + unixmessage m ; unsigned int nullfds = 0 ; pid_t pid ; int wstat ; size_t envc = env_len(envp) ; uint32_t cargc, cenvc, carglen, cenvlen ; - tain_t deadline = TAIN_INFINITE_RELATIVE ; + tain deadline = TAIN_INFINITE_RELATIVE ; PROG = "s6-sudod" ; { - subgetopt_t l = SUBGETOPT_ZERO ; + subgetopt l = SUBGETOPT_ZERO ; unsigned int t = 0 ; for (;;) { @@ -176,7 +176,7 @@ int main (int argc, char const *const *argv, char const *const *envp) x[0].fd = selfpipe_init() ; if (x[0].fd < 0) strerr_diefu1sys(111, "selfpipe_init") ; - if (selfpipe_trap(SIGCHLD) < 0) strerr_diefu1sys(111, "trap SIGCHLD") ; + if (!selfpipe_trap(SIGCHLD)) strerr_diefu1sys(111, "trap SIGCHLD") ; if (pipecoe(p) < 0) strerr_diefu1sys(111, "pipe") ; pid = fork() ; if (pid < 0) strerr_diefu1sys(111, "fork") ; |