summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2013-02-04 23:22:54 -0500
committerRay Strode <rstrode@redhat.com>2013-02-04 23:25:06 -0500
commit22364a4989acad0de1235fece70c640dcc7dd044 (patch)
treeef0f63b218d107283cf2b05f5e7c5e443faa3ccf
parent9fbd02da3c1fa2e2d3b64b9546926ac22f912ca2 (diff)
downloadgdm-22364a4989acad0de1235fece70c640dcc7dd044.tar.gz
slave: don't log directly to journald
if we just let it inherit from the daemon's stderr, then journald will interpret the log priorities in its output. https://bugzilla.gnome.org/show_bug.cgi?id=692308
-rw-r--r--daemon/gdm-slave-proxy.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/daemon/gdm-slave-proxy.c b/daemon/gdm-slave-proxy.c
index 76d992bd..887a4f03 100644
--- a/daemon/gdm-slave-proxy.c
+++ b/daemon/gdm-slave-proxy.c
@@ -34,10 +34,6 @@
#include <systemd/sd-daemon.h>
#endif
-#ifdef ENABLE_SYSTEMD_JOURNAL
-#include <systemd/sd-journal.h>
-#endif
-
#include <glib.h>
#include <glib/gi18n.h>
#include <glib/gstdio.h>
@@ -141,23 +137,8 @@ typedef struct {
static void
spawn_child_setup (SpawnChildData *data)
{
-#ifdef ENABLE_SYSTEMD_JOURNAL
+#ifdef WITH_SYSTEMD
if (sd_booted () > 0) {
- int stdout_fd, stderr_fd;
-
- stdout_fd = sd_journal_stream_fd (data->identifier, LOG_INFO, FALSE);
- stderr_fd = sd_journal_stream_fd (data->identifier, LOG_WARNING, FALSE);
-
- gdm_clear_close_on_exec_flag (stdout_fd);
- gdm_clear_close_on_exec_flag (stderr_fd);
-
- if (stdout_fd != -1) {
- VE_IGNORE_EINTR (dup2 (stdout_fd, STDOUT_FILENO));
- }
-
- if (stderr_fd != -1) {
- VE_IGNORE_EINTR (dup2 (stderr_fd, STDERR_FILENO));
- }
return;
}
#endif
@@ -204,7 +185,7 @@ spawn_command_line_async (const char *command_line,
data.identifier = argv[0];
-#ifdef ENABLE_SYSTEMD_JOURNAL
+#ifdef WITH_SYSTEMD
if (sd_booted () > 0) {
has_journald = TRUE;
}