diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-22 21:10:06 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-22 21:12:25 +0100 |
commit | 565a9388f261c6e459e1726e358284ff687ec941 (patch) | |
tree | cce42dd93071c05746697f106425c141f6ece2ef /src | |
parent | 9bf3b53533cdc9b95c921b71da755401f223f765 (diff) |
journal: when we shall go down do so cleanly
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/journald.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c index aa12fa785d..37896d050d 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -72,6 +72,12 @@ int main(int argc, char *argv[]) { for (;;) { usec_t t = (usec_t) -1, n; + r = sd_event_get_state(server.event); + if (r < 0) + goto finish; + if (r == SD_EVENT_FINISHED) + break; + n = now(CLOCK_REALTIME); if (server.max_retention_usec > 0 && server.oldest_file_usec > 0) { |