summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-11-10 21:01:35 +0100
committerDaniel Mack <github@zonque.org>2015-11-10 21:01:35 +0100
commite3c4a681db0b7004904b95d55fd1a443161c9397 (patch)
treea5b08abba6a533a3c4fc2a8f1bb9097957580c46 /src/journal
parent092b6e188b6b75be4450c6f20fc82599dcaf9552 (diff)
parentde7399eb7427da46c5cd355181080274f69567a2 (diff)
Merge pull request #1835 from poettering/grabbag-of-stuff
Lots of small fixes
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/coredump.c4
-rw-r--r--src/journal/journald-server.c16
2 files changed, 16 insertions, 4 deletions
diff --git a/src/journal/coredump.c b/src/journal/coredump.c
index 4c83e311db..f750ddfcbd 100644
--- a/src/journal/coredump.c
+++ b/src/journal/coredump.c
@@ -126,8 +126,8 @@ static int parse_config(void) {
{}
};
- return config_parse_many("/etc/systemd/coredump.conf",
- CONF_DIRS_NULSTR("systemd/coredump.conf"),
+ return config_parse_many(PKGSYSCONFDIR "/coredump.conf",
+ CONF_PATHS_NULSTR("systemd/coredump.conf.d"),
"Coredump\0",
config_item_table_lookup, items,
false, NULL);
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 7a70dcbc57..36fe739073 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -1296,10 +1296,22 @@ static int setup_signals(Server *s) {
if (r < 0)
return r;
+ /* Let's process SIGTERM late, so that we flush all queued
+ * messages to disk before we exit */
+ r = sd_event_source_set_priority(s->sigterm_event_source, SD_EVENT_PRIORITY_NORMAL+20);
+ if (r < 0)
+ return r;
+
+ /* When journald is invoked on the terminal (when debugging),
+ * it's useful if C-c is handled equivalent to SIGTERM. */
r = sd_event_add_signal(s->event, &s->sigint_event_source, SIGINT, dispatch_sigterm, s);
if (r < 0)
return r;
+ r = sd_event_source_set_priority(s->sigint_event_source, SD_EVENT_PRIORITY_NORMAL+20);
+ if (r < 0)
+ return r;
+
return 0;
}
@@ -1360,8 +1372,8 @@ static int server_parse_proc_cmdline(Server *s) {
static int server_parse_config_file(Server *s) {
assert(s);
- return config_parse_many("/etc/systemd/journald.conf",
- CONF_DIRS_NULSTR("systemd/journald.conf"),
+ return config_parse_many(PKGSYSCONFDIR "/journald.conf",
+ CONF_PATHS_NULSTR("systemd/journald.conf.d"),
"Journal\0",
config_item_perf_lookup, journald_gperf_lookup,
false, s);