daemon_fork(struct daemon* daemon)
{
int have_view_respip_cfg = 0;
+ int ret;
log_assert(daemon);
if(!(daemon->views = views_create()))
/* Start resolver service on main thread. */
#ifdef HAVE_SYSTEMD
- sd_notify(0, "READY=1");
+ ret = sd_notify(0, "READY=1");
+ if(ret <= 0 && getenv("NOTIFY_SOCKET"))
+ fatal_exit("sd_notify failed %s: %s. Make sure that unbound has "
+ "access/permission to use the socket presented by systemd.",
+ getenv("NOTIFY_SOCKET"),
+ (ret==0?"no $NOTIFY_SOCKET": strerror(-ret)));
#endif
log_info("start of service (%s).", PACKAGE_STRING);
worker_work(daemon->workers[0]);
+14 August 2019: George
+ - Fix #59, when compiled with systemd support check that we can properly
+ communicate with systemd through the `NOTIFY_SOCKET`.
+
14 August 2019: Wouter
- Generate configlexer with newer flex.