summaryrefslogtreecommitdiff
path: root/src/conn-tools
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-12-09 18:27:43 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-12-09 18:27:43 +0000
commitdd4afee4a8ea8c44126c44b31c6f1a36582d0964 (patch)
tree9ca57ff17554b33edc6a86be5e736bdc833f4158 /src/conn-tools
parentfddebb529fb620a9e038340fc554ec2e543802be (diff)
downloads6-dd4afee4a8ea8c44126c44b31c6f1a36582d0964.tar.xz
Get rid of webipc.h
Diffstat (limited to 'src/conn-tools')
-rw-r--r--src/conn-tools/s6-ipcclient.c2
-rw-r--r--src/conn-tools/s6-ipcserver-access.c2
-rw-r--r--src/conn-tools/s6-ipcserver-socketbinder.c11
-rw-r--r--src/conn-tools/s6-ipcserverd.c2
4 files changed, 9 insertions, 8 deletions
diff --git a/src/conn-tools/s6-ipcclient.c b/src/conn-tools/s6-ipcclient.c
index 0b17853..1ec68dd 100644
--- a/src/conn-tools/s6-ipcclient.c
+++ b/src/conn-tools/s6-ipcclient.c
@@ -5,7 +5,7 @@
#include <skalibs/sgetopt.h>
#include <skalibs/strerr2.h>
#include <skalibs/djbunix.h>
-#include <skalibs/webipc.h>
+#include <skalibs/socket.h>
#include <skalibs/exec.h>
#define USAGE "s6-ipcclient [ -q | -Q | -v ] [ -p bindpath ] [ -l localname ] path prog..."
diff --git a/src/conn-tools/s6-ipcserver-access.c b/src/conn-tools/s6-ipcserver-access.c
index 752ecab..0356f60 100644
--- a/src/conn-tools/s6-ipcserver-access.c
+++ b/src/conn-tools/s6-ipcserver-access.c
@@ -11,7 +11,7 @@
#include <skalibs/sgetopt.h>
#include <skalibs/cdb.h>
#include <skalibs/djbunix.h>
-#include <skalibs/webipc.h>
+#include <skalibs/socket.h>
#include <skalibs/exec.h>
#include <s6/config.h>
diff --git a/src/conn-tools/s6-ipcserver-socketbinder.c b/src/conn-tools/s6-ipcserver-socketbinder.c
index f5abf67..ce63830 100644
--- a/src/conn-tools/s6-ipcserver-socketbinder.c
+++ b/src/conn-tools/s6-ipcserver-socketbinder.c
@@ -1,14 +1,15 @@
/* ISC license. */
+#include <skalibs/nonposix.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <unistd.h>
+#include <fcntl.h>
#include <skalibs/types.h>
#include <skalibs/sgetopt.h>
#include <skalibs/strerr2.h>
-#include <skalibs/djbunix.h>
-#include <skalibs/webipc.h>
+#include <skalibs/socket.h>
#include <skalibs/exec.h>
#define USAGE "s6-ipcserver-socketbinder [ -d | -D ] [ -b backlog ] [ -M | -m ] [ -a perms ] [ -B ] path prog..."
@@ -19,7 +20,7 @@ int main (int argc, char const *const *argv)
unsigned int backlog = SOMAXCONN ;
int flagreuse = 1 ;
int flagdgram = 0 ;
- int flagblocking = 0 ;
+ unsigned int flags = O_NONBLOCK ;
unsigned int perms = 0777 ;
PROG = "s6-ipcserver-socketbinder" ;
{
@@ -34,7 +35,7 @@ int main (int argc, char const *const *argv)
case 'd' : flagreuse = 1 ; break ;
case 'M' : flagdgram = 0 ; break ;
case 'm' : flagdgram = 1 ; break ;
- case 'B' : flagblocking = 1 ; break ;
+ case 'B' : flags = 0 ; break ;
case 'b' : if (!uint0_scan(l.arg, &backlog)) dieusage() ; break ;
case 'a' : if (!uint0_oscan(l.arg, &perms)) dieusage() ; break ;
default : dieusage() ;
@@ -44,7 +45,7 @@ int main (int argc, char const *const *argv)
}
if (argc < 2) dieusage() ;
close(0) ;
- if (flagdgram ? ipc_datagram_internal(flagblocking ? 0 : DJBUNIX_FLAG_NB) : ipc_stream_internal(flagblocking ? 0 : DJBUNIX_FLAG_NB))
+ if (flagdgram ? ipc_datagram_internal(flags) : ipc_stream_internal(flags))
strerr_diefu1sys(111, "create socket") ;
{
diff --git a/src/conn-tools/s6-ipcserverd.c b/src/conn-tools/s6-ipcserverd.c
index 9edb4ad..6a8f84e 100644
--- a/src/conn-tools/s6-ipcserverd.c
+++ b/src/conn-tools/s6-ipcserverd.c
@@ -19,7 +19,7 @@
#include <skalibs/sig.h>
#include <skalibs/selfpipe.h>
#include <skalibs/iopause.h>
-#include <skalibs/webipc.h>
+#include <skalibs/socket.h>
#include <skalibs/exec.h>
#define USAGE "s6-ipcserverd [ -v verbosity ] [ -1 ] [ -P | -p ] [ -c maxconn ] [ -C localmaxconn ] prog..."