From b3699dd5df18db3c060bb88a74c1b05e37154c76 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Tue, 29 Mar 2016 16:59:41 -0400 Subject: replace packet mode pipes with unix domain sockets --- src/server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server.c') diff --git a/src/server.c b/src/server.c index ba7d916..6e8dba2 100644 --- a/src/server.c +++ b/src/server.c @@ -255,9 +255,9 @@ static void new_connection_cb(EV_P_ ev_io *w, int revents) int readpipe[2]; /* child->parent */ int outpipe [2]; /* parent->child */ - if(pipe(readpipe) < 0) + if(socketpair(AF_UNIX, SOCK_SEQPACKET, 0, readpipe) < 0) error("error creating pipe, need linux kernel >= 3.4"); - if(pipe(outpipe) < 0) + if(socketpair(AF_UNIX, SOCK_SEQPACKET, 0, outpipe) < 0) error("error creating pipe, need linux kernel >= 3.4"); pid_t pid = fork(); -- cgit v1.1