***/
#include <errno.h>
-#include <pwd.h>
-#include <fcntl.h>
#include <string.h>
#include <unistd.h>
-#include <sys/epoll.h>
#include "sd-daemon.h"
-#include "strv.h"
-#include "conf-parser.h"
#include "cgroup-util.h"
-#include "mkdir.h"
#include "bus-util.h"
#include "bus-error.h"
#include "label.h"
+#include "machine-image.h"
#include "machined.h"
Manager *manager_new(void) {
void manager_free(Manager *m) {
Machine *machine;
+ Image *i;
assert(m);
hashmap_free(m->machine_units);
hashmap_free(m->machine_leaders);
+ while ((i = hashmap_steal_first(m->image_cache)))
+ image_unref(i);
+
+ hashmap_free(m->image_cache);
+
+ sd_event_source_unref(m->image_cache_defer_event);
+
bus_verify_polkit_async_registry_free(m->polkit_registry);
sd_bus_unref(m->bus);
* check stays in. */
mkdir_label("/run/systemd/machines", 0755);
+ assert_se(sigprocmask_many(SIG_BLOCK, SIGCHLD, -1) >= 0);
+
m = manager_new();
if (!m) {
r = log_oom();