X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=execute.c;h=12f514504cabac8261fa3b39e863bf9841615718;hb=136337ff74f05be3d42a769d9f0cb99716c5c40f;hp=ef24f71a253d0f369c9644689bdcb2c2af73c1b8;hpb=bab45044482dc012331c768c08d78a2d006485ad;p=elogind.git diff --git a/execute.c b/execute.c index ef24f71a2..12f514504 100644 --- a/execute.c +++ b/execute.c @@ -187,10 +187,12 @@ static int connect_logger_as(const ExecContext *context, ExecOutput output, cons dprintf(fd, "%s\n" "%i\n" - "%s\n", + "%s\n" + "%i\n", output == EXEC_OUTPUT_KERNEL ? "kmsg" : "syslog", context->syslog_priority, - context->syslog_identifier ? context->syslog_identifier : ident); + context->syslog_identifier ? context->syslog_identifier : ident, + !context->syslog_no_prefix); if (fd != nfd) { r = dup2(fd, nfd) < 0 ? -errno : nfd; @@ -1035,6 +1037,8 @@ int exec_spawn(ExecCommand *command, goto fail; } + assert(n_env <= 6); + if (!(final_env = strv_env_merge(environment, our_env, context->environment, NULL))) { r = EXIT_MEMORY; goto fail; @@ -1062,10 +1066,7 @@ int exec_spawn(ExecCommand *command, * sure that when we kill the cgroup the process will be * killed too). */ if (cgroup_bondings) - if ((r = cgroup_bonding_install_list(cgroup_bondings, pid)) < 0) { - r = EXIT_CGROUP; - goto fail; - } + cgroup_bonding_install_list(cgroup_bondings, pid); log_debug("Forked %s as %llu", command->path, (unsigned long long) pid);