diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-05-09 23:53:52 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-05-09 23:53:52 +0200 |
commit | 1137a57c2677936bab56c26591a42c93a5e670a8 (patch) | |
tree | 52a4b49bae3558526bcede18fbc3aba48857a967 /manager.c | |
parent | 6e620becc8543e9ea8381fcd779dd932c2464749 (diff) |
environment: allow control of the environment block via D-Bus
Diffstat (limited to 'manager.c')
-rw-r--r-- | manager.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -51,6 +51,7 @@ #include "unit-name.h" #include "dbus-unit.h" #include "dbus-job.h" +#include "missing.h" /* As soon as 16 units are in our GC queue, make sure to run a gc sweep */ #define GC_QUEUE_ENTRIES_MAX 16 @@ -336,6 +337,9 @@ int manager_new(ManagerRunningAs running_as, bool confirm_spawn, Manager **_m) { m->signal_watch.fd = m->mount_watch.fd = m->udev_watch.fd = m->epoll_fd = m->dev_autofs_fd = -1; m->current_job_id = 1; /* start as id #1, so that we can leave #0 around as "null-like" value */ + if (!(m->environment = strv_copy(environ))) + goto fail; + if (!(m->units = hashmap_new(string_hash_func, string_compare_func))) goto fail; @@ -544,6 +548,7 @@ void manager_free(Manager *m) { strv_free(m->unit_path); strv_free(m->sysvinit_path); strv_free(m->sysvrcnd_path); + strv_free(m->environment); free(m->cgroup_controller); free(m->cgroup_hierarchy); |