[gnome-session] manager: treat non-0 exit status for required components as fail
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] manager: treat non-0 exit status for required components as fail
- Date: Tue, 17 Jul 2012 02:21:23 +0000 (UTC)
commit e79b73a308bb086f6ef9f95eeeebc211f1f70343
Author: Ray Strode <rstrode redhat com>
Date: Mon Jul 16 22:16:26 2012 -0400
manager: treat non-0 exit status for required components as fail
The only exit status that truely, definitely means 'success' is 0.
Anything else is almostly certainly a failure of some sort. For
required components, we can be extra sure that's true, so enforce
it there.
This avoids cases where exec() fails in a subshell, and other cases.
https://bugzilla.gnome.org/show_bug.cgi?id=672419
gnome-session/gsm-manager.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index a222210..9f7cff5 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -648,10 +648,10 @@ app_exited (GsmApp *app,
{
g_debug ("App %s exited with %d", gsm_app_peek_app_id (app), exit_code);
- /* Consider that "exit = 1" means "crash" for required components */
- if (exit_code == 1 && is_app_required (manager, app)) {
+ /* Consider that non-success exit status means "crash" for required components */
+ if (exit_code != 0 && is_app_required (manager, app)) {
if (gsm_app_peek_autorestart (app)) {
- g_debug ("Component '%s' is autorestart, ignoring exited(1) signal",
+ g_debug ("Component '%s' is autorestart, ignoring non-successful exit",
gsm_app_peek_app_id (app));
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]