* "disabled" load state?
-* uid are 32bit
-
* %m in printf() instead of strerror();
* gc: don't reap broken services
}
if (n_fds > 0)
- if (asprintf(our_env + n_env++, "LISTEN_PID=%llu", (unsigned long long) getpid()) < 0 ||
+ if (asprintf(our_env + n_env++, "LISTEN_PID=%lu", (unsigned long) getpid()) < 0 ||
asprintf(our_env + n_env++, "LISTEN_FDS=%u", n_fds) < 0) {
r = EXIT_MEMORY;
goto fail;
if (cgroup_bondings)
cgroup_bonding_install_list(cgroup_bondings, pid);
- log_debug("Forked %s as %llu", command->path, (unsigned long long) pid);
+ log_debug("Forked %s as %lu", command->path, (unsigned long) pid);
command->exec_status.pid = pid;
command->exec_status.start_timestamp = now(CLOCK_REALTIME);
return;
fprintf(f,
- "%sPID: %llu\n",
- prefix, (unsigned long long) s->pid);
+ "%sPID: %lu\n",
+ prefix, (unsigned long) s->pid);
if (s->start_timestamp > 0)
fprintf(f,
log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
log_parse_environment();
- log_info("systemd-initctl running as pid %llu", (unsigned long long) getpid());
+ log_info("systemd-initctl running as pid %lu", (unsigned long) getpid());
if ((n = sd_listen_fds(true)) < 0) {
log_error("Failed to read listening file descriptors from environment: %s", strerror(-r));
server_done(&server);
- log_info("systemd-initctl stopped as pid %llu", (unsigned long long) getpid());
+ log_info("systemd-initctl stopped as pid %lu", (unsigned long) getpid());
dbus_shutdown();
if (strftime(header_time, sizeof(header_time), "%h %e %T ", tm) <= 0)
return -EINVAL;
- snprintf(header_pid, sizeof(header_pid), "[%llu]: ", (unsigned long long) getpid());
+ snprintf(header_pid, sizeof(header_pid), "[%lu]: ", (unsigned long) getpid());
char_array_0(header_pid);
zero(iovec);
snprintf(header_priority, sizeof(header_priority), "<%i>", LOG_PRI(level));
char_array_0(header_priority);
- snprintf(header_pid, sizeof(header_pid), "[%llu]: ", (unsigned long long) getpid());
+ snprintf(header_pid, sizeof(header_pid), "[%lu]: ", (unsigned long) getpid());
char_array_0(header_pid);
zero(iovec);
return -EINVAL;
}
- snprintf(header_pid, sizeof(header_pid), "[%llu]: ", (unsigned long long) s->pid);
+ snprintf(header_pid, sizeof(header_pid), "[%lu]: ", (unsigned long) s->pid);
char_array_0(header_pid);
zero(iovec);
log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
log_parse_environment();
- log_info("systemd-logger running as pid %llu", (unsigned long long) getpid());
+ log_info("systemd-logger running as pid %lu", (unsigned long) getpid());
if ((n = sd_listen_fds(true)) < 0) {
log_error("Failed to read listening file descriptors from environment: %s", strerror(-r));
server_done(&server);
- log_info("systemd-logger stopped as pid %llu", (unsigned long long) getpid());
+ log_info("systemd-logger stopped as pid %lu", (unsigned long) getpid());
return r;
}
else if (!WCOREDUMP(status))
log_error("Caught <%s>, core dump failed.", strsignal(sig));
else
- log_error("Caught <%s>, dumped core as pid %llu.", strsignal(sig), (unsigned long long) pid);
+ log_error("Caught <%s>, dumped core as pid %lu.", strsignal(sig), (unsigned long) pid);
}
}
_exit(1);
}
- log_info("Successfully spawned crash shall as pid %llu.", (unsigned long long) pid);
+ log_info("Successfully spawned crash shall as pid %lu.", (unsigned long) pid);
}
log_info("Freezing execution.");
char *name = NULL;
get_process_name(si.si_pid, &name);
- log_debug("Got SIGCHLD for process %llu (%s)", (unsigned long long) si.si_pid, strna(name));
+ log_debug("Got SIGCHLD for process %lu (%s)", (unsigned long) si.si_pid, strna(name));
free(name);
}
if (si.si_code != CLD_EXITED && si.si_code != CLD_KILLED && si.si_code != CLD_DUMPED)
continue;
- 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)));
if (m->control_pid > 0)
fprintf(f,
- "%sControl PID: %llu\n",
- prefix, (unsigned long long) m->control_pid);
+ "%sControl PID: %lu\n",
+ prefix, (unsigned long) m->control_pid);
exec_context_dump(&m->exec_context, f, prefix);
}
if (s->control_pid > 0)
fprintf(f,
- "%sControl PID: %llu\n",
- prefix, (unsigned long long) s->control_pid);
+ "%sControl PID: %lu\n",
+ prefix, (unsigned long) s->control_pid);
if (s->main_pid > 0)
fprintf(f,
- "%sMain PID: %llu\n",
- prefix, (unsigned long long) s->main_pid);
+ "%sMain PID: %lu\n",
+ prefix, (unsigned long) s->main_pid);
if (s->pid_file)
fprintf(f,
if (s->control_pid > 0)
fprintf(f,
- "%sControl PID: %llu\n",
- prefix, (unsigned long long) s->control_pid);
+ "%sControl PID: %lu\n",
+ prefix, (unsigned long) s->control_pid);
if (s->bind_to_device)
fprintf(f,
return -errno;
if (asprintf(&r,
- "%u-%llu-%llu",
+ "%u-%lu-%lu",
nr,
- (unsigned long long) ucred.pid,
- (unsigned long long) ucred.uid) < 0)
+ (unsigned long) ucred.pid,
+ (unsigned long) ucred.uid) < 0)
return -ENOMEM;
break;
int r;
FILE *f;
char fn[132], line[256], *p;
- long long unsigned ppid;
+ long unsigned ppid;
assert(pid >= 0);
assert(_ppid);
- assert_se(snprintf(fn, sizeof(fn)-1, "/proc/%llu/stat", (unsigned long long) pid) < (int) (sizeof(fn)-1));
+ assert_se(snprintf(fn, sizeof(fn)-1, "/proc/%lu/stat", (unsigned long) pid) < (int) (sizeof(fn)-1));
fn[sizeof(fn)-1] = 0;
if (!(f = fopen(fn, "r")))
if (sscanf(p, " "
"%*c " /* state */
- "%llu ", /* ppid */
+ "%lu ", /* ppid */
&ppid) != 1)
return -EIO;
- if ((long long unsigned) (pid_t) ppid != ppid)
+ if ((long unsigned) (pid_t) ppid != ppid)
return -ERANGE;
*_ppid = (pid_t) ppid;
assert(pid >= 1);
assert(name);
- if (asprintf(&p, "/proc/%llu/comm", (unsigned long long) pid) < 0)
+ if (asprintf(&p, "/proc/%lu/comm", (unsigned long) pid) < 0)
return -ENOMEM;
r = read_one_line_file(p, name);