process on shutdown.
Found while working on tame(2).
OK benno@
-/* $OpenBSD: control.c,v 1.6 2015/01/21 22:21:05 reyk Exp $ */
+/* $OpenBSD: control.c,v 1.7 2015/05/28 17:08:08 florian Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
return;
event_del(&cs->cs_ev);
event_del(&cs->cs_evt);
- (void)unlink(cs->cs_name);
}
/* ARGSUSED */
-/* $OpenBSD: httpd.c,v 1.35 2015/02/23 18:43:18 reyk Exp $ */
+/* $OpenBSD: httpd.c,v 1.36 2015/05/28 17:08:09 florian Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
errx(1, "unknown user %s", HTTPD_USER);
/* Configure the control socket */
- ps->ps_csock.cs_name = HTTPD_SOCKET;
+ ps->ps_csock.cs_name = NULL;
log_init(debug);
log_verbose(verbose);
proc_kill(env->sc_ps);
control_cleanup(&env->sc_ps->ps_csock);
+ if (env->sc_ps->ps_csock.cs_name != NULL)
+ (void)unlink(env->sc_ps->ps_csock.cs_name);
free(env->sc_ps);
free(env);
-/* $OpenBSD: control.c,v 1.48 2015/01/22 17:42:09 reyk Exp $ */
+/* $OpenBSD: control.c,v 1.49 2015/05/28 17:08:09 florian Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
return;
event_del(&cs->cs_ev);
event_del(&cs->cs_evt);
- (void)unlink(cs->cs_name);
}
/* ARGSUSED */
-/* $OpenBSD: relayd.c,v 1.139 2015/05/02 13:15:24 claudio Exp $ */
+/* $OpenBSD: relayd.c,v 1.140 2015/05/28 17:08:09 florian Exp $ */
/*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
proc_kill(env->sc_ps);
control_cleanup(&env->sc_ps->ps_csock);
+ (void)unlink(env->sc_ps->ps_csock.cs_name);
carp_demote_shutdown();
free(env->sc_ps);
-/* $OpenBSD: control.c,v 1.28 2015/01/16 00:05:13 deraadt Exp $ */
+/* $OpenBSD: control.c,v 1.29 2015/05/28 17:08:09 florian Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
return;
event_del(&cs->cs_ev);
event_del(&cs->cs_evt);
- (void)unlink(cs->cs_name);
}
/* ARGSUSED */
-/* $OpenBSD: snmpd.c,v 1.27 2015/02/08 23:28:48 tedu Exp $ */
+/* $OpenBSD: snmpd.c,v 1.28 2015/05/28 17:08:09 florian Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
{
proc_kill(&env->sc_ps);
+ if (env->sc_ps.ps_csock.cs_name != NULL)
+ (void)unlink(env->sc_ps.ps_csock.cs_name);
+
free(env);
log_info("terminating");