From: Guus Sliepen Date: Wed, 20 May 2015 19:28:54 +0000 (+0200) Subject: Use socketpair() instead of pipe() for the umbilical. X-Git-Tag: release-1.1pre12~134 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=87e09527735632aae3f595f5a28667880ca4c8c1;p=tinc Use socketpair() instead of pipe() for the umbilical. This prepares for a possible conversion of the umbilical socket to a control socket. --- diff --git a/src/tincctl.c b/src/tincctl.c index c6d4aac5..bbc5c026 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -854,8 +854,8 @@ static int cmd_start(int argc, char *argv[]) { return status; #else int pfd[2] = {-1, -1}; - if(pipe(pfd)) { - fprintf(stderr, "Could not create umbilical pipe: %s\n", strerror(errno)); + if(socketpair(AF_UNIX, SOCK_STREAM, 0, pfd)) { + fprintf(stderr, "Could not create umbilical socket: %s\n", strerror(errno)); free(nargv); return 1; }