From: renato Date: Mon, 8 Aug 2016 16:48:53 +0000 (+0000) Subject: rde and eigrpe should use exit(3) instead of _exit(2) X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=beaf8b10db6659e9286b2e90c46a23e26239a6a1;p=openbsd rde and eigrpe should use exit(3) instead of _exit(2) Since recently these processes call exec() after fork(), so they should stop using _exit(2) and use exit(3) instead when shutting down. ok claudio@ --- diff --git a/usr.sbin/eigrpd/eigrpe.c b/usr.sbin/eigrpd/eigrpe.c index 1a4a143d79a..56b290884b1 100644 --- a/usr.sbin/eigrpd/eigrpe.c +++ b/usr.sbin/eigrpd/eigrpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eigrpe.c,v 1.24 2016/06/05 17:07:41 renato Exp $ */ +/* $OpenBSD: eigrpe.c,v 1.25 2016/08/08 16:48:53 renato Exp $ */ /* * Copyright (c) 2015 Renato Westphal @@ -195,7 +195,7 @@ eigrpe_shutdown(void) free(pkt_ptr); log_info("eigrp engine exiting"); - _exit(0); + exit(0); } /* imesg */ diff --git a/usr.sbin/eigrpd/log.c b/usr.sbin/eigrpd/log.c index 895f69852bb..b8ee06b0d78 100644 --- a/usr.sbin/eigrpd/log.c +++ b/usr.sbin/eigrpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.3 2016/04/15 13:10:56 renato Exp $ */ +/* $OpenBSD: log.c,v 1.4 2016/08/08 16:48:53 renato Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -157,10 +157,7 @@ fatal(const char *emsg) logit(LOG_CRIT, "fatal in %s: %s", procnames[eigrpd_process], emsg); - if (eigrpd_process == PROC_MAIN) - exit(1); - else /* parent copes via SIGCHLD */ - _exit(1); + exit(1); } void diff --git a/usr.sbin/eigrpd/rde.c b/usr.sbin/eigrpd/rde.c index 1e302206aa6..bb9d32b9631 100644 --- a/usr.sbin/eigrpd/rde.c +++ b/usr.sbin/eigrpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.17 2016/06/05 03:36:41 renato Exp $ */ +/* $OpenBSD: rde.c,v 1.18 2016/08/08 16:48:53 renato Exp $ */ /* * Copyright (c) 2015 Renato Westphal @@ -142,7 +142,7 @@ rde_shutdown(void) free(iev_main); log_info("route decision engine exiting"); - _exit(0); + exit(0); } int