const char *pidfile;
const char *socket;
int pid;
+ int startup_fd;
} options = {
.debug_level = "ERR",
+ .startup_fd = -1,
};
struct poptOption cmdline_options[] = {
"eventd pid file", "FILE" },
{ "socket", 's', POPT_ARG_STRING, &options.socket, 0,
"eventd socket path", "FILE" },
+ { "startup-fd", 'S', POPT_ARG_INT, &options.startup_fd, 0,
+ "file descriptor to notify of successful start", "FD" },
POPT_TABLEEND
};
goto fail;
}
+ if (options.startup_fd != -1) {
+ sock_daemon_set_startup_fd(sockd, options.startup_fd);
+ }
+
ret = sock_daemon_run(ev, sockd,
options.pidfile, false, false, options.pid);
if (ret == EINTR) {