summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-08-24 11:43:17 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-08-24 11:43:17 +0000
commit356c5e0878707c555acdb6214efe2d70ca66654f (patch)
tree4cd290060b021d132b1706781e3f3fe32c422564 /usr.sbin/bgpd
parent0b992434e875069b81c42e432e00c82438a143dd (diff)
use session_socket_blockmode() instead of hand-rolling roughly the same
claudio ok
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/bgpd.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c
index d68e0fa8f3d..f4c0fd4653b 100644
--- a/usr.sbin/bgpd/bgpd.c
+++ b/usr.sbin/bgpd/bgpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.c,v 1.104 2004/08/05 21:01:38 claudio Exp $ */
+/* $OpenBSD: bgpd.c,v 1.105 2004/08/24 11:43:16 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -178,19 +178,16 @@ main(int argc, char *argv[])
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_m2s) == -1)
fatal("socketpair");
- if (fcntl(pipe_m2s[0], F_SETFL, O_NONBLOCK) == -1 ||
- fcntl(pipe_m2s[1], F_SETFL, O_NONBLOCK) == -1)
- fatal("fcntl");
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_m2r) == -1)
fatal("socketpair");
- if (fcntl(pipe_m2r[0], F_SETFL, O_NONBLOCK) == -1 ||
- fcntl(pipe_m2r[1], F_SETFL, O_NONBLOCK) == -1)
- fatal("fcntl");
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_s2r) == -1)
fatal("socketpair");
- if (fcntl(pipe_s2r[0], F_SETFL, O_NONBLOCK) == -1 ||
- fcntl(pipe_s2r[1], F_SETFL, O_NONBLOCK) == -1)
- fatal("fcntl");
+ session_socket_blockmode(pipe_m2s[0], BM_NONBLOCK);
+ session_socket_blockmode(pipe_m2s[1], BM_NONBLOCK);
+ session_socket_blockmode(pipe_m2r[0], BM_NONBLOCK);
+ session_socket_blockmode(pipe_m2r[1], BM_NONBLOCK);
+ session_socket_blockmode(pipe_s2r[0], BM_NONBLOCK);
+ session_socket_blockmode(pipe_s2r[1], BM_NONBLOCK);
prepare_listeners(&conf);