if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, m->notify_watch.fd, &ev) < 0)
return -errno;
if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, m->notify_watch.fd, &ev) < 0)
return -errno;
if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, m->signal_watch.fd, &ev) < 0)
return -errno;
if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, m->signal_watch.fd, &ev) < 0)
return -errno;
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 */
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 ((r = bus_init_system(m)) < 0 ||
- (r = bus_init_api(m)) < 0)
+ if ((r = bus_init(m)) < 0)
+ goto fail;
+
+ if (asprintf(&p, "%s/%s", m->cgroup_mount_point, m->cgroup_hierarchy) < 0) {
+ r = -ENOMEM;
LIST_REMOVE(Meta, gc_queue, m->gc_queue, meta);
meta->in_gc_queue = false;
LIST_REMOVE(Meta, gc_queue, m->gc_queue, meta);
meta->in_gc_queue = false;
meta->gc_marker == gc_marker + GC_OFFSET_UNSURE) {
log_debug("Collecting %s", meta->id);
meta->gc_marker = gc_marker + GC_OFFSET_BAD;
meta->gc_marker == gc_marker + GC_OFFSET_UNSURE) {
log_debug("Collecting %s", meta->id);
meta->gc_marker = gc_marker + GC_OFFSET_BAD;
lookup_paths_free(&m->lookup_paths);
strv_free(m->environment);
free(m->cgroup_controller);
free(m->cgroup_hierarchy);
lookup_paths_free(&m->lookup_paths);
strv_free(m->environment);
free(m->cgroup_controller);
free(m->cgroup_hierarchy);
if (!(tags = strv_split(buf, "\n\r")))
return -ENOMEM;
log_debug("Got notification message for unit %s", u->meta.id);
if (UNIT_VTABLE(u)->notify_message)
if (!(tags = strv_split(buf, "\n\r")))
return -ENOMEM;
log_debug("Got notification message for unit %s", u->meta.id);
if (UNIT_VTABLE(u)->notify_message)
- log_debug("Child %llu died (code=%s, status=%i/%s)",
- (long long unsigned) si.si_pid,
+ log_debug("Child %lu died (code=%s, status=%i/%s)",
+ (long unsigned) si.si_pid,
sigchld_code_to_string(si.si_code),
si.si_status,
strna(si.si_code == CLD_EXITED ? exit_status_to_string(si.si_status) : strsignal(si.si_status)));
sigchld_code_to_string(si.si_code),
si.si_status,
strna(si.si_code == CLD_EXITED ? exit_status_to_string(si.si_status) : strsignal(si.si_status)));
manager_start_target(m, SPECIAL_KBREQUEST_TARGET, JOB_REPLACE);
/* This is a nop on non-init */
break;
case SIGPWR:
manager_start_target(m, SPECIAL_KBREQUEST_TARGET, JOB_REPLACE);
/* This is a nop on non-init */
break;
case SIGPWR:
manager_start_target(m, SPECIAL_SIGPWR_TARGET, JOB_REPLACE);
/* This is a nop on non-init */
manager_start_target(m, SPECIAL_SIGPWR_TARGET, JOB_REPLACE);
/* This is a nop on non-init */
if (!u || UNIT_IS_ACTIVE_OR_RELOADING(unit_active_state(u))) {
log_info("Trying to reconnect to bus...");
if (!u || UNIT_IS_ACTIVE_OR_RELOADING(unit_active_state(u))) {
log_info("Trying to reconnect to bus...");
if ((int) sfsi.ssi_signo >= SIGRTMIN+0 &&
(int) sfsi.ssi_signo < SIGRTMIN+(int) ELEMENTSOF(table)) {
manager_start_target(m, table[sfsi.ssi_signo - SIGRTMIN],
if ((int) sfsi.ssi_signo >= SIGRTMIN+0 &&
(int) sfsi.ssi_signo < SIGRTMIN+(int) ELEMENTSOF(table)) {
manager_start_target(m, table[sfsi.ssi_signo - SIGRTMIN],
[MANAGER_SYSTEM] = "system",
[MANAGER_SESSION] = "session"
};
[MANAGER_SYSTEM] = "system",
[MANAGER_SESSION] = "session"
};