diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-05-02 13:56:07 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-05-02 13:56:07 -0400 |
commit | 8ad54a01825f962458cfac9e5a62e7268ac2fa05 (patch) | |
tree | d291750e20dc93c40871f24815104f455dd71711 /src/machine/machined.c | |
parent | 33e40442c6c5d296dfaa733b8429bff1a24869cc (diff) | |
parent | d13febb1e0d17ce11cfa904085c91e98d336f476 (diff) |
Merge pull request #3153 from poettering/async-clone
machined: make "clone" asynchronous, and support copy-based fall-back
Diffstat (limited to 'src/machine/machined.c')
-rw-r--r-- | src/machine/machined.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/machine/machined.c b/src/machine/machined.c index f2c1966a6b..f7ceb5e603 100644 --- a/src/machine/machined.c +++ b/src/machine/machined.c @@ -70,6 +70,11 @@ void manager_free(Manager *m) { assert(m); + while (m->operations) + operation_free(m->operations); + + assert(m->n_operations == 0); + while ((machine = hashmap_first(m->machines))) machine_free(machine); @@ -336,6 +341,9 @@ int manager_startup(Manager *m) { static bool check_idle(void *userdata) { Manager *m = userdata; + if (m->operations) + return false; + manager_gc(m, true); return hashmap_isempty(m->machines); |