From: renato Date: Mon, 8 Aug 2016 21:42:13 +0000 (+0000) Subject: Use exit(3) instead of _exit(2) in the child processes. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=220e0715a1e26cdc1979ef753c233b7c64238679;p=openbsd Use exit(3) instead of _exit(2) in the child processes. Since recently the child 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/ldpd/lde.c b/usr.sbin/ldpd/lde.c index 0d77543792f..94f4adaf2b6 100644 --- a/usr.sbin/ldpd/lde.c +++ b/usr.sbin/ldpd/lde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lde.c,v 1.63 2016/08/08 16:45:51 renato Exp $ */ +/* $OpenBSD: lde.c,v 1.64 2016/08/08 21:42:13 renato Exp $ */ /* * Copyright (c) 2013, 2016 Renato Westphal @@ -163,7 +163,7 @@ lde_shutdown(void) free(iev_main); log_info("label decision engine exiting"); - _exit(0); + exit(0); } /* imesg */ diff --git a/usr.sbin/ldpd/ldpe.c b/usr.sbin/ldpd/ldpe.c index f110b9d7c0f..8fb724b2b09 100644 --- a/usr.sbin/ldpd/ldpe.c +++ b/usr.sbin/ldpd/ldpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldpe.c,v 1.67 2016/06/18 17:31:32 renato Exp $ */ +/* $OpenBSD: ldpe.c,v 1.68 2016/08/08 21:42:13 renato Exp $ */ /* * Copyright (c) 2013, 2016 Renato Westphal @@ -191,7 +191,7 @@ ldpe_shutdown(void) free(pkt_ptr); log_info("ldp engine exiting"); - _exit(0); + exit(0); } /* imesg */ diff --git a/usr.sbin/ldpd/log.c b/usr.sbin/ldpd/log.c index 66fb8068bf9..782b27476c4 100644 --- a/usr.sbin/ldpd/log.c +++ b/usr.sbin/ldpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.30 2016/08/08 16:45:51 renato Exp $ */ +/* $OpenBSD: log.c,v 1.31 2016/08/08 21:42:13 renato Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -163,10 +163,7 @@ fatal(const char *emsg) logit(LOG_CRIT, "fatal in %s: %s", procnames[ldpd_process], emsg); - if (ldpd_process == PROC_MAIN) - exit(1); - else /* parent copes via SIGCHLD */ - _exit(1); + exit(1); } void