chiark / gitweb /
core: reuse the same /tmp, /var/tmp and inaccessible dir
[elogind.git] / src / core / manager.h
index 913752f9ef68c473bcec20e76812b9dabb5773e8..9d8d9439d2a426420042440f9236e4cace6014e1 100644 (file)
@@ -60,7 +60,9 @@ enum WatchType {
         WATCH_SWAP,
         WATCH_UDEV,
         WATCH_DBUS_WATCH,
-        WATCH_DBUS_TIMEOUT
+        WATCH_DBUS_TIMEOUT,
+        WATCH_TIME_CHANGE,
+        WATCH_JOBS_IN_PROGRESS
 };
 
 struct Watch {
@@ -83,6 +85,7 @@ struct Watch {
 #include "set.h"
 #include "dbus.h"
 #include "path-lookup.h"
+#include "execute.h"
 
 struct Manager {
         /* Note that the set of units we know of is allowed to be
@@ -125,6 +128,8 @@ struct Manager {
 
         Watch notify_watch;
         Watch signal_watch;
+        Watch time_change_watch;
+        Watch jobs_in_progress_watch;
 
         int epoll_fd;
 
@@ -200,11 +205,6 @@ struct Manager {
          * file system */
         int pin_cgroupfs_fd;
 
-        /* Audit fd */
-#ifdef HAVE_AUDIT
-        int audit_fd;
-#endif
-
         /* Flags */
         SystemdRunningAs running_as;
         ManagerExitCode exit_code:5;
@@ -228,6 +228,11 @@ struct Manager {
         unsigned n_installed_jobs;
         unsigned n_failed_jobs;
 
+        /* Jobs in progress watching */
+        unsigned n_running_jobs;
+        unsigned n_on_console;
+        unsigned jobs_in_progress_iteration;
+
         /* Type=idle pipes */
         int idle_pipe[2];
 
@@ -275,10 +280,11 @@ int manager_open_serialization(Manager *m, FILE **_f);
 
 int manager_serialize(Manager *m, FILE *f, FDSet *fds, bool serialize_jobs);
 int manager_deserialize(Manager *m, FILE *f, FDSet *fds);
+int manager_distribute_fds(Manager *m, FDSet *fds);
 
 int manager_reload(Manager *m);
 
-bool manager_is_booting_or_shutting_down(Manager *m);
+bool manager_is_reloading_or_reexecuting(Manager *m);
 
 void manager_reset_failed(Manager *m);
 
@@ -295,4 +301,6 @@ void manager_undo_generators(Manager *m);
 void manager_recheck_journal(Manager *m);
 
 void manager_set_show_status(Manager *m, bool b);
-bool manager_get_show_status(Manager *m);
+void manager_status_printf(Manager *m, bool ephemeral, const char *status, const char *format, ...);
+
+void watch_init(Watch *w);