diff options
author | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2007-12-10 20:31:57 +0000 |
---|---|---|
committer | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2007-12-10 20:31:57 +0000 |
commit | e92e7510592dba3b58b7ed9ac5f36c6af66262b9 (patch) | |
tree | 1583328d502cde45b0dfc8a3a7145e9e1c50d131 /usr.sbin/relayd/relayd.c | |
parent | 90c190137734a053d9a248969b804e6a3566360c (diff) |
Warn the user when reloading a new configuration fails instead of killing
the daemon.
ok reyk@
Diffstat (limited to 'usr.sbin/relayd/relayd.c')
-rw-r--r-- | usr.sbin/relayd/relayd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index f65a25a2b72..c3a9504b8e2 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.64 2007/12/08 20:36:36 pyr Exp $ */ +/* $OpenBSD: relayd.c,v 1.65 2007/12/10 20:31:56 pyr Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -390,8 +390,12 @@ reconfigure(void) struct host *host; log_info("reloading configuration"); - if ((new_env = parse_config(env->confpath, env->opts)) == NULL) - exit(1); + if ((new_env = parse_config(env->confpath, env->opts)) == NULL) { + purge_config(new_env, PURGE_EVERYTHING); + free(new_env); + log_warnx("configuration reloading FAILED"); + return; + } purge_config(env, PURGE_EVERYTHING); merge_config(env, new_env); |