summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/relayd.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2010-02-17 14:39:31 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2010-02-17 14:39:31 +0000
commit3257404939b7a0fb250779c766c6f24d512c2665 (patch)
tree62c0887e771c205854fb5e2ad6dd633358cef053 /usr.sbin/relayd/relayd.c
parentf4191bcb029cf68048ab9e461b1c2811d68b6ce5 (diff)
Always call the shutdown code after returning from event_dispatch().
As the child processes now call event_loopexit() and signal handling is done through libevent if a child process died we wouldn't always cleanup properly and wouldn't do carp demote to failover either. This matches the way ospfd does things which is where the event_loopexit() in child processes change came from originally. ok claudio@ pyr@
Diffstat (limited to 'usr.sbin/relayd/relayd.c')
-rw-r--r--usr.sbin/relayd/relayd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c
index 325806eb3e3..7e6afa31a01 100644
--- a/usr.sbin/relayd/relayd.c
+++ b/usr.sbin/relayd/relayd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayd.c,v 1.95 2010/02/04 13:00:20 jsg Exp $ */
+/* $OpenBSD: relayd.c,v 1.96 2010/02/17 14:39:30 jsg Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -301,6 +301,8 @@ main(int argc, char *argv[])
event_dispatch();
+ main_shutdown(env);
+ /* NOTREACHED */
return (0);
}