#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
}
if (m->running_as == MANAGER_INIT) {
- /* /etc/init.d/ compativility does not matter to users */
+ /* /etc/init.d/ compatibility does not matter to users */
if ((e = getenv("SYSTEMD_SYSVINIT_PATH")))
if (!(m->sysvinit_path = split_path_and_make_absolute(e)))
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;
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);
/* This is a nop on non-init */
break;
- case SIGUSR1:
- manager_dump_units(m, stdout, "\t");
- manager_dump_jobs(m, stdout, "\t");
- break;
-
- case SIGUSR2: {
+ case SIGUSR1: {
Unit *u;
u = manager_get_unit(m, SPECIAL_DBUS_SERVICE);
break;
}
+ case SIGUSR2:
+ manager_dump_units(m, stdout, "\t");
+ manager_dump_jobs(m, stdout, "\t");
+ break;
+
case SIGHUP:
m->exit_code = MANAGER_RELOAD;
break;