After reexec PID 1 our bus connection is invalidated. Hence don't try to
reuse it, just terminate so that when we are spawned the next time we
just get a new one.
Spotted by Marti Raudsepp.
unsigned n_fifos;
DBusConnection *bus;
+
+ bool quit;
} Server;
struct Fifo {
case 'U':
if (kill(1, SIGTERM) < 0)
log_error("kill() failed: %m");
+
+ /* The bus connection will be
+ * terminated if PID 1 is reexecuted,
+ * hence let's just exit here, and
+ * rely on that we'll be restarted on
+ * the next request */
+ s->quit = true;
break;
case 'q':
"READY=1\n"
"STATUS=Processing requests...");
- for (;;) {
+ while (!server.quit) {
struct epoll_event event;
int k;