chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bus: stop using EDEADLOCK
[elogind.git]
/
src
/
journal
/
coredump.c
diff --git
a/src/journal/coredump.c
b/src/journal/coredump.c
index f6b95145d20d22bd8fd33c13c09a966cd1e44007..6357d3e277295b3fde0f95ea24f9984cd386c152 100644
(file)
--- a/
src/journal/coredump.c
+++ b/
src/journal/coredump.c
@@
-23,7
+23,6
@@
#include <unistd.h>
#include <stdio.h>
#include <sys/prctl.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/prctl.h>
-#include <sys/types.h>
#include <sys/xattr.h>
#ifdef HAVE_ELFUTILS
#include <sys/xattr.h>
#ifdef HAVE_ELFUTILS
@@
-44,7
+43,6
@@
#include "conf-parser.h"
#include "copy.h"
#include "stacktrace.h"
#include "conf-parser.h"
#include "copy.h"
#include "stacktrace.h"
-#include "path-util.h"
#include "compress.h"
#include "acl-util.h"
#include "capability.h"
#include "compress.h"
#include "acl-util.h"
#include "capability.h"
@@
-634,11
+632,11
@@
int main(int argc, char* argv[]) {
goto finish;
}
goto finish;
}
- core_unit = str
append
a("COREDUMP_UNIT=", t);
+ core_unit = str
join
a("COREDUMP_UNIT=", t);
free(t);
} else if (cg_pid_get_user_unit(pid, &t) >= 0) {
free(t);
} else if (cg_pid_get_user_unit(pid, &t) >= 0) {
- core_unit = str
append
a("COREDUMP_USER_UNIT=", t);
+ core_unit = str
join
a("COREDUMP_USER_UNIT=", t);
free(t);
}
free(t);
}
@@
-650,20
+648,20
@@
int main(int argc, char* argv[]) {
log_set_target(LOG_TARGET_JOURNAL_OR_KMSG);
log_open();
log_set_target(LOG_TARGET_JOURNAL_OR_KMSG);
log_open();
- core_pid = str
append
a("COREDUMP_PID=", info[INFO_PID]);
+ core_pid = str
join
a("COREDUMP_PID=", info[INFO_PID]);
IOVEC_SET_STRING(iovec[j++], core_pid);
IOVEC_SET_STRING(iovec[j++], core_pid);
- core_uid = str
append
a("COREDUMP_UID=", info[INFO_UID]);
+ core_uid = str
join
a("COREDUMP_UID=", info[INFO_UID]);
IOVEC_SET_STRING(iovec[j++], core_uid);
IOVEC_SET_STRING(iovec[j++], core_uid);
- core_gid = str
append
a("COREDUMP_GID=", info[INFO_GID]);
+ core_gid = str
join
a("COREDUMP_GID=", info[INFO_GID]);
IOVEC_SET_STRING(iovec[j++], core_gid);
IOVEC_SET_STRING(iovec[j++], core_gid);
- core_signal = str
append
a("COREDUMP_SIGNAL=", info[INFO_SIGNAL]);
+ core_signal = str
join
a("COREDUMP_SIGNAL=", info[INFO_SIGNAL]);
IOVEC_SET_STRING(iovec[j++], core_signal);
if (sd_pid_get_session(pid, &t) >= 0) {
IOVEC_SET_STRING(iovec[j++], core_signal);
if (sd_pid_get_session(pid, &t) >= 0) {
- core_session = str
append
a("COREDUMP_SESSION=", t);
+ core_session = str
join
a("COREDUMP_SESSION=", t);
free(t);
IOVEC_SET_STRING(iovec[j++], core_session);
free(t);
IOVEC_SET_STRING(iovec[j++], core_session);
@@
-677,31
+675,31
@@
int main(int argc, char* argv[]) {
}
if (sd_pid_get_slice(pid, &t) >= 0) {
}
if (sd_pid_get_slice(pid, &t) >= 0) {
- core_slice = str
append
a("COREDUMP_SLICE=", t);
+ core_slice = str
join
a("COREDUMP_SLICE=", t);
free(t);
IOVEC_SET_STRING(iovec[j++], core_slice);
}
if (comm) {
free(t);
IOVEC_SET_STRING(iovec[j++], core_slice);
}
if (comm) {
- core_comm = str
append
a("COREDUMP_COMM=", comm);
+ core_comm = str
join
a("COREDUMP_COMM=", comm);
IOVEC_SET_STRING(iovec[j++], core_comm);
}
if (exe) {
IOVEC_SET_STRING(iovec[j++], core_comm);
}
if (exe) {
- core_exe = str
append
a("COREDUMP_EXE=", exe);
+ core_exe = str
join
a("COREDUMP_EXE=", exe);
IOVEC_SET_STRING(iovec[j++], core_exe);
}
if (get_process_cmdline(pid, 0, false, &t) >= 0) {
IOVEC_SET_STRING(iovec[j++], core_exe);
}
if (get_process_cmdline(pid, 0, false, &t) >= 0) {
- core_cmdline = str
append
a("COREDUMP_CMDLINE=", t);
+ core_cmdline = str
join
a("COREDUMP_CMDLINE=", t);
free(t);
IOVEC_SET_STRING(iovec[j++], core_cmdline);
}
if (cg_pid_get_path_shifted(pid, NULL, &t) >= 0) {
free(t);
IOVEC_SET_STRING(iovec[j++], core_cmdline);
}
if (cg_pid_get_path_shifted(pid, NULL, &t) >= 0) {
- core_cgroup = str
append
a("COREDUMP_CGROUP=", t);
+ core_cgroup = str
join
a("COREDUMP_CGROUP=", t);
free(t);
IOVEC_SET_STRING(iovec[j++], core_cgroup);
free(t);
IOVEC_SET_STRING(iovec[j++], core_cgroup);
@@
-752,14
+750,14
@@
int main(int argc, char* argv[]) {
}
if (get_process_cwd(pid, &t) >= 0) {
}
if (get_process_cwd(pid, &t) >= 0) {
- core_cwd = str
append
a("COREDUMP_CWD=", t);
+ core_cwd = str
join
a("COREDUMP_CWD=", t);
free(t);
IOVEC_SET_STRING(iovec[j++], core_cwd);
}
if (get_process_root(pid, &t) >= 0) {
free(t);
IOVEC_SET_STRING(iovec[j++], core_cwd);
}
if (get_process_root(pid, &t) >= 0) {
- core_root = str
append
a("COREDUMP_ROOT=", t);
+ core_root = str
join
a("COREDUMP_ROOT=", t);
free(t);
IOVEC_SET_STRING(iovec[j++], core_root);
free(t);
IOVEC_SET_STRING(iovec[j++], core_root);
@@
-799,7
+797,7
@@
int main(int argc, char* argv[]) {
if (r == 0) {
const char *coredump_filename;
if (r == 0) {
const char *coredump_filename;
- coredump_filename = str
append
a("COREDUMP_FILENAME=", filename);
+ coredump_filename = str
join
a("COREDUMP_FILENAME=", filename);
IOVEC_SET_STRING(iovec[j++], coredump_filename);
}
IOVEC_SET_STRING(iovec[j++], coredump_filename);
}