gdm r5793 - in trunk: . common gui/simple-greeter
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r5793 - in trunk: . common gui/simple-greeter
- Date: Mon, 18 Feb 2008 20:26:28 +0000 (GMT)
Author: mccann
Date: Mon Feb 18 20:26:28 2008
New Revision: 5793
URL: http://svn.gnome.org/viewvc/gdm?rev=5793&view=rev
Log:
2008-02-18 William Jon McCann <jmccann redhat com>
* common/gdm-common.c: (gdm_is_version_unstable),
(gdm_set_fatal_warnings_if_unstable):
* common/gdm-common.h:
Add a function to see if release is unstable.
* gui/simple-greeter/gdm-session-client.c:
(gdm_session_client_start):
Don't redirect client output to /dev/null in unstable
releases.
Modified:
trunk/ChangeLog
trunk/common/gdm-common.c
trunk/common/gdm-common.h
trunk/gui/simple-greeter/gdm-session-client.c
Modified: trunk/common/gdm-common.c
==============================================================================
--- trunk/common/gdm-common.c (original)
+++ trunk/common/gdm-common.c Mon Feb 18 20:26:28 2008
@@ -33,21 +33,34 @@
#include "gdm-common.h"
-void
-gdm_set_fatal_warnings_if_unstable (void)
+gboolean
+gdm_is_version_unstable (void)
{
- char **versions;
+ char **versions;
+ gboolean unstable;
+
+ unstable = FALSE;
versions = g_strsplit (VERSION, ".", 3);
if (versions && versions [0] && versions [1]) {
int major;
major = atoi (versions [1]);
if ((major % 2) != 0) {
- g_setenv ("G_DEBUG", "fatal_criticals", FALSE);
- g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
+ unstable = TRUE;
}
}
g_strfreev (versions);
+
+ return unstable;
+}
+
+void
+gdm_set_fatal_warnings_if_unstable (void)
+{
+ if (gdm_is_version_unstable ()) {
+ g_setenv ("G_DEBUG", "fatal_criticals", FALSE);
+ g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
+ }
}
int
Modified: trunk/common/gdm-common.h
==============================================================================
--- trunk/common/gdm-common.h (original)
+++ trunk/common/gdm-common.h Mon Feb 18 20:26:28 2008
@@ -27,6 +27,7 @@
G_BEGIN_DECLS
+gboolean gdm_is_version_unstable (void);
void gdm_set_fatal_warnings_if_unstable (void);
int gdm_signal_pid (int pid,
Modified: trunk/gui/simple-greeter/gdm-session-client.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-session-client.c (original)
+++ trunk/gui/simple-greeter/gdm-session-client.c Mon Feb 18 20:26:28 2008
@@ -104,6 +104,7 @@
char **argv;
gboolean res;
gboolean ret;
+ int flags;
g_return_val_if_fail (GDM_IS_SESSION_CLIENT (client), FALSE);
@@ -120,14 +121,19 @@
goto out;
}
+ flags = G_SPAWN_SEARCH_PATH
+ | G_SPAWN_DO_NOT_REAP_CHILD;
+
+ if (! gdm_is_version_unstable ()) {
+ flags |= G_SPAWN_STDOUT_TO_DEV_NULL
+ | G_SPAWN_STDERR_TO_DEV_NULL;
+ }
+
local_error = NULL;
res = g_spawn_async (NULL,
argv,
NULL,
- G_SPAWN_SEARCH_PATH
- | G_SPAWN_DO_NOT_REAP_CHILD
- | G_SPAWN_STDOUT_TO_DEV_NULL
- | G_SPAWN_STDERR_TO_DEV_NULL,
+ flags,
NULL,
NULL,
&client->priv->pid,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]