diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-21 18:18:22 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-21 18:18:22 +0000 |
commit | 0f23cb47eca5cddce63081e10be18eece9a8428d (patch) | |
tree | 6a0893e88bcd649281d7d8f425894be6b09fb5b5 /usr.sbin/bgpd/bgpd.c | |
parent | 4020903675a3a8b04ca739ced056bd39179eeedc (diff) |
use pipe(2)s instead of socketpair(2)s.
suggested by tedu@ for a performance gain, ok claudio@
Diffstat (limited to 'usr.sbin/bgpd/bgpd.c')
-rw-r--r-- | usr.sbin/bgpd/bgpd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c index c8dab2e354f..f96b28e1487 100644 --- a/usr.sbin/bgpd/bgpd.c +++ b/usr.sbin/bgpd/bgpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.c,v 1.8 2003/12/20 21:26:48 henning Exp $ */ +/* $OpenBSD: bgpd.c,v 1.9 2003/12/21 18:18:21 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -155,18 +155,18 @@ main(int argc, char *argv[]) logit(LOG_INFO, "startup"); - if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_m2s) == -1) - fatal("socketpair", errno); + if (pipe(pipe_m2s) == -1) + fatal("pipe", errno); if (fcntl(pipe_m2s[0], F_SETFL, O_NONBLOCK) == -1 || fcntl(pipe_m2s[1], F_SETFL, O_NONBLOCK) == -1) fatal("fcntl", errno); - if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_m2r) == -1) - fatal("socketpair", errno); + if (pipe(pipe_m2r) == -1) + fatal("pipe", errno); if (fcntl(pipe_m2r[0], F_SETFL, O_NONBLOCK) == -1 || fcntl(pipe_m2r[1], F_SETFL, O_NONBLOCK) == -1) fatal("fcntl", errno); - if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_s2r) == -1) - fatal("socketpair", errno); + if (pipe(pipe_s2r) == -1) + fatal("pipe", errno); if (fcntl(pipe_s2r[0], F_SETFL, O_NONBLOCK) == -1 || fcntl(pipe_s2r[1], F_SETFL, O_NONBLOCK) == -1) fatal("fcntl", errno); |