[gnome-session] gsm: Pass signal id in "died" signal of GsmApp
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] gsm: Pass signal id in "died" signal of GsmApp
- Date: Tue, 27 Mar 2012 08:35:55 +0000 (UTC)
commit 2b2567f6a90c18a0dc11cf936256dce79f9b8c83
Author: Vincent Untz <vuntz gnome org>
Date: Fri Mar 23 17:09:26 2012 +0100
gsm: Pass signal id in "died" signal of GsmApp
https://bugzilla.gnome.org/show_bug.cgi?id=672419
gnome-session/gsm-app.c | 9 +++++----
gnome-session/gsm-app.h | 6 ++++--
gnome-session/gsm-autostart-app.c | 2 +-
gnome-session/gsm-manager.c | 3 ++-
4 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/gnome-session/gsm-app.c b/gnome-session/gsm-app.c
index ad940dd..9470bad 100644
--- a/gnome-session/gsm-app.c
+++ b/gnome-session/gsm-app.c
@@ -292,9 +292,9 @@ gsm_app_class_init (GsmAppClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GsmAppClass, died),
NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__INT,
G_TYPE_NONE,
- 0);
+ 1, G_TYPE_INT);
signals[REGISTERED] =
g_signal_new ("registered",
@@ -480,11 +480,12 @@ gsm_app_exited (GsmApp *app,
}
void
-gsm_app_died (GsmApp *app)
+gsm_app_died (GsmApp *app,
+ int signal)
{
g_return_if_fail (GSM_IS_APP (app));
- g_signal_emit (app, signals[DIED], 0);
+ g_signal_emit (app, signals[DIED], 0, signal);
}
gboolean
diff --git a/gnome-session/gsm-app.h b/gnome-session/gsm-app.h
index 9604b96..b3a5e59 100644
--- a/gnome-session/gsm-app.h
+++ b/gnome-session/gsm-app.h
@@ -56,7 +56,8 @@ struct _GsmAppClass
/* signals */
void (*exited) (GsmApp *app,
guchar exit_code);
- void (*died) (GsmApp *app);
+ void (*died) (GsmApp *app,
+ int signal);
void (*registered) (GsmApp *app);
/* virtual methods */
@@ -112,7 +113,8 @@ gboolean gsm_app_is_running (GsmApp *app);
void gsm_app_exited (GsmApp *app,
guchar exit_code);
-void gsm_app_died (GsmApp *app);
+void gsm_app_died (GsmApp *app,
+ int signal);
gboolean gsm_app_provides (GsmApp *app,
const char *service);
diff --git a/gnome-session/gsm-autostart-app.c b/gnome-session/gsm-autostart-app.c
index 70118f3..8959ac6 100644
--- a/gnome-session/gsm-autostart-app.c
+++ b/gnome-session/gsm-autostart-app.c
@@ -921,7 +921,7 @@ app_exited (GPid pid,
if (WIFEXITED (status)) {
gsm_app_exited (GSM_APP (app), WEXITSTATUS (status));
} else if (WIFSIGNALED (status)) {
- gsm_app_died (GSM_APP (app));
+ gsm_app_died (GSM_APP (app), WTERMSIG (status));
}
}
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index 96747f7..d6048d7 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -631,9 +631,10 @@ _restart_app (GsmManager *manager,
static void
app_died (GsmApp *app,
+ int signal,
GsmManager *manager)
{
- g_warning ("Application '%s' killed by signal", gsm_app_peek_app_id (app));
+ g_warning ("Application '%s' killed by signal %d", gsm_app_peek_app_id (app), signal);
if (gsm_app_peek_autorestart (app)) {
g_debug ("Component '%s' is autorestart, ignoring died signal",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]