journalctl: optionally delay --follow exit for a journal synchronization
Let's optionally issue a Varlink Synchronize() call in --follow mode when asked to terminate. This is useful so that the tool can be called and it is guaranteed it processed all messages generated before the request to exit before it exits. We want this in "systemd-run -v" in particular, so that we can be sure we are not missing any log output from the invoked service before it exits
This commit is contained in:
@@ -127,7 +127,8 @@ int journal_fork(RuntimeScope scope, const char * const *units, PidRef *ret_pidr
|
||||
"-q",
|
||||
"--follow",
|
||||
"--no-pager",
|
||||
"--lines=1");
|
||||
"--lines=1",
|
||||
"--synchronize-on-exit=yes");
|
||||
if (!argv)
|
||||
return log_oom_debug();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user