diff options
author | William Jon McCann <jmccann@redhat.com> | 2008-02-18 20:26:28 +0000 |
---|---|---|
committer | William Jon McCann <mccann@src.gnome.org> | 2008-02-18 20:26:28 +0000 |
commit | 6dde44cf190b4a27a76b91567f49c893ef04681a (patch) | |
tree | 36c2b56b73d25bb48a16502a1f0aeb960232ffbc /common | |
parent | f4b997c88a2bb36e26c7943aaaf38ca9bd11a3ef (diff) | |
download | gdm-6dde44cf190b4a27a76b91567f49c893ef04681a.tar.gz |
Add a function to see if release is unstable. Don't redirect client output
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.
svn path=/trunk/; revision=5793
Diffstat (limited to 'common')
-rw-r--r-- | common/gdm-common.c | 23 | ||||
-rw-r--r-- | common/gdm-common.h | 1 |
2 files changed, 19 insertions, 5 deletions
diff --git a/common/gdm-common.c b/common/gdm-common.c index 2e783470..ec9fe99e 100644 --- a/common/gdm-common.c +++ b/common/gdm-common.c @@ -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 diff --git a/common/gdm-common.h b/common/gdm-common.h index a1aea54e..1f3bbd4a 100644 --- a/common/gdm-common.h +++ b/common/gdm-common.h @@ -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, |