Commit e326e762 authored by Simon McVittie's avatar Simon McVittie

Add comments describing how "compile with journald, run without" works

parent 5be1e778
......@@ -1292,7 +1292,10 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p,
/* this may fail, but not critical */
/* This may fail, but it's not critical.
* In particular, if we were compiled with journald support but are now
* running on a non-systemd system, this is going to fail, so we
* have to cope gracefully. */
fd_out = sd_journal_stream_fd (sitter->log_name, LOG_INFO, FALSE);
fd_err = sd_journal_stream_fd (sitter->log_name, LOG_WARNING, FALSE);
......@@ -1337,7 +1340,7 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p,
signal (SIGPIPE, SIG_IGN);
/* log to systemd journal */
/* log to systemd journal if possible */
if (fd_out >= 0)
dup2 (fd_out, STDOUT_FILENO);
if (fd_err >= 0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment