diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-28 19:24:07 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-28 19:24:07 +0000 |
commit | 66ad87a41a59f24bbe3d0b6622e44237644049ba (patch) | |
tree | bda9d0cf59e4e424abae1ac51f94069e0813c6f5 /usr.sbin/bgpd/rde.c | |
parent | 3e2f292ef720e5e24799a9a032fed4c1d8ee63bd (diff) |
catch SIGINT here as well so we can properly shut down if ^C'ed in debug mode
Diffstat (limited to 'usr.sbin/bgpd/rde.c')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 9265d03ed85..e1fbc296253 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.69 2004/01/27 21:56:21 henning Exp $ */ +/* $OpenBSD: rde.c,v 1.70 2004/01/28 19:24:06 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -75,6 +75,7 @@ void rde_sighdlr(int sig) { switch (sig) { + case SIGINT: case SIGTERM: rde_quit = 1; break; @@ -124,6 +125,7 @@ rde_main(struct bgpd_config *config, struct peer *peer_l, endpwent(); signal(SIGTERM, rde_sighdlr); + signal(SIGINT, rde_sighdlr); close(pipe_s2r[0]); close(pipe_m2r[0]); |