diff options
author | Ray Strode <rstrode@redhat.com> | 2009-04-23 11:24:09 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2009-04-23 11:24:09 -0400 |
commit | ffdb44356dcfc8b88c6daa471398d2c634161783 (patch) | |
tree | 31b2c4a9b819b2cb775ecf3083fb0ee6f91d5e22 | |
parent | 0f9656ac2dcb0e0b42223012e01fbd919d6eb3ef (diff) | |
download | gdm-ffdb44356dcfc8b88c6daa471398d2c634161783.tar.gz |
Store name of worker job after starting it
This makes it easier to print debug messages.
-rw-r--r-- | daemon/gdm-session-worker-job.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/daemon/gdm-session-worker-job.c b/daemon/gdm-session-worker-job.c index 0327d77b..01ca4ea2 100644 --- a/daemon/gdm-session-worker-job.c +++ b/daemon/gdm-session-worker-job.c @@ -54,6 +54,7 @@ extern char **environ; struct GdmSessionWorkerJobPrivate { char *command; + char *name; GPid pid; guint child_watch_id; @@ -91,7 +92,8 @@ session_worker_job_child_watch (GPid pid, int status, GdmSessionWorkerJob *job) { - g_debug ("GdmSessionWorkerJob: child (pid:%d) done (%s:%d)", + g_warning ("GdmSessionWorkerJob: child '%s' (pid:%d) done (%s:%d)", + job->priv->name, (int) pid, WIFEXITED (status) ? "status" : WIFSIGNALED (status) ? "signal" @@ -103,6 +105,9 @@ session_worker_job_child_watch (GPid pid, g_spawn_close_pid (job->priv->pid); job->priv->pid = -1; + g_free (job->priv->name); + job->priv->name = NULL; + if (WIFEXITED (status)) { int code = WEXITSTATUS (status); g_signal_emit (job, signals [EXITED], 0, code); @@ -273,6 +278,7 @@ gdm_session_worker_job_start (GdmSessionWorkerJob *session_worker_job, g_debug ("GdmSessionWorkerJob: Starting worker..."); + session_worker_job->priv->name = g_strdup (name); res = gdm_session_worker_job_spawn (session_worker_job, name); if (res) { |