#include "dasynq.h"
+#include "dinit.h"
#include "dinit-log.h"
#include "control-cmds.h"
#include "service-listener.h"
// Control connection for dinit
-using eventloop_t = dasynq::event_loop<dasynq::null_mutex>;
-
class control_conn_t;
class control_conn_watcher;
#include <sys/reboot.h>
#endif
+#include "dinit.h"
#include "dasynq.h"
#include "service.h"
#include "control.h"
static void control_socket_cb(eventloop_t *loop, int fd);
-void open_control_socket(bool report_ro_failure = true) noexcept;
-void setup_external_log() noexcept;
-
// Variables
--- /dev/null
+#ifndef DINIT_H_INCLUDED
+#define DINIT_H_INCLUDED 1
+
+#include "dasynq.h"
+
+/*
+ * General Dinit definitions.
+ */
+
+using eventloop_t = dasynq::event_loop<dasynq::null_mutex>;
+
+using clock_type = dasynq::clock_type;
+using rearm = dasynq::rearm;
+using time_val = dasynq::time_val;
+
+void open_control_socket(bool report_ro_failure = true) noexcept;
+void setup_external_log() noexcept;
+
+extern eventloop_t event_loop;
+
+#endif
#include <sys/un.h>
#include <sys/socket.h>
+#include "dinit.h"
#include "dinit-socket.h"
#include "dinit-util.h"
#include "proc-service.h"
* See proc-service.h header for interface details.
*/
-extern eventloop_t event_loop;
-
-using clock_type = dasynq::clock_type;
-using rearm = dasynq::rearm;
-using time_val = dasynq::time_val;
-
// Given a string and a list of pairs of (start,end) indices for each argument in that string,
// store a null terminator for the argument. Return a `char *` vector containing the beginning
// of each argument and a trailing nullptr. (The returned array is invalidated if the string is later modified).
#include <unistd.h>
#include <termios.h>
+#include "dinit.h"
#include "service.h"
#include "dinit-log.h"
#include "dinit-socket.h"
* See service.h for details.
*/
-// from dinit.cc:
-void open_control_socket(bool report_ro_failure = true) noexcept;
-void setup_external_log() noexcept;
-
-using clock_type = dasynq::clock_type;
-using rearm = dasynq::rearm;
-using time_val = dasynq::time_val;
-
// Find the requested service by name
static service_record * find_service(const std::list<service_record *> & records,
const char *name) noexcept