now instead of terminating the process.
ok blambert@
-/* $OpenBSD: proc.c,v 1.10 2014/07/12 14:15:04 reyk Exp $ */
+/* $OpenBSD: proc.c,v 1.11 2014/08/18 13:13:42 reyk Exp $ */
/*
* Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org>
#include <pwd.h>
#include <event.h>
-#include <openssl/ssl.h>
-
#include "snmpd.h"
void proc_open(struct privsep *, struct privsep_proc *,
/*
* Open socket pairs for our peers
- */
+ */
for (proc = 0; proc < nproc; proc++) {
procs[proc].p_ps = ps;
procs[proc].p_env = ps->ps_env;
case SIGCHLD:
case SIGHUP:
case SIGPIPE:
+ case SIGUSR1:
/* ignore */
break;
default:
signal_set(&ps->ps_evsigchld, SIGCHLD, proc_sig_handler, p);
signal_set(&ps->ps_evsighup, SIGHUP, proc_sig_handler, p);
signal_set(&ps->ps_evsigpipe, SIGPIPE, proc_sig_handler, p);
+ signal_set(&ps->ps_evsigusr1, SIGUSR1, proc_sig_handler, p);
signal_add(&ps->ps_evsigint, NULL);
signal_add(&ps->ps_evsigterm, NULL);
signal_add(&ps->ps_evsigchld, NULL);
signal_add(&ps->ps_evsighup, NULL);
signal_add(&ps->ps_evsigpipe, NULL);
+ signal_add(&ps->ps_evsigusr1, NULL);
proc_listen(ps, procs, nproc);
-/* $OpenBSD: snmpd.c,v 1.23 2014/05/23 18:37:20 benno Exp $ */
+/* $OpenBSD: snmpd.c,v 1.24 2014/08/18 13:13:42 reyk Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
case SIGHUP:
/* reconfigure */
break;
+ case SIGUSR1:
+ /* ignore */
+ break;
default:
fatalx("unexpected signal");
}
signal_set(&ps->ps_evsigchld, SIGCHLD, snmpd_sig_handler, ps);
signal_set(&ps->ps_evsighup, SIGHUP, snmpd_sig_handler, ps);
signal_set(&ps->ps_evsigpipe, SIGPIPE, snmpd_sig_handler, ps);
+ signal_set(&ps->ps_evsigusr1, SIGUSR1, snmpd_sig_handler, ps);
signal_add(&ps->ps_evsigint, NULL);
signal_add(&ps->ps_evsigterm, NULL);
signal_add(&ps->ps_evsigchld, NULL);
signal_add(&ps->ps_evsighup, NULL);
signal_add(&ps->ps_evsigpipe, NULL);
+ signal_add(&ps->ps_evsigusr1, NULL);
proc_listen(ps, procs, nitems(procs));
-/* $OpenBSD: snmpd.h,v 1.55 2014/05/14 09:42:22 mikeb Exp $ */
+/* $OpenBSD: snmpd.h,v 1.56 2014/08/18 13:13:42 reyk Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
struct event ps_evsigchld;
struct event ps_evsighup;
struct event ps_evsigpipe;
+ struct event ps_evsigusr1;
void *ps_env;
};