[gdm/wip/wayland: 8/10] daemon: don't allow worker to commit suicide when it's parent dies



commit 72ddba4aac0b79b373578210814e9e161addef5f
Author: Ray Strode <rstrode redhat com>
Date:   Mon Sep 16 11:44:13 2013 -0400

    daemon: don't allow worker to commit suicide when it's parent dies
    
    We're going to supporting the worker disowning itself from it's parent,
    and this code was only really failsafe code anyway.

 daemon/gdm-session-worker-job.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/daemon/gdm-session-worker-job.c b/daemon/gdm-session-worker-job.c
index 557c452..d7eb03c 100644
--- a/daemon/gdm-session-worker-job.c
+++ b/daemon/gdm-session-worker-job.c
@@ -83,15 +83,6 @@ static void     gdm_session_worker_job_finalize (GObject         *object);
 G_DEFINE_TYPE (GdmSessionWorkerJob, gdm_session_worker_job, G_TYPE_OBJECT)
 
 static void
-session_worker_job_child_setup (GdmSessionWorkerJob *session_worker_job)
-{
-        /* Terminate the process when the parent dies */
-#ifdef HAVE_SYS_PRCTL_H
-        prctl (PR_SET_PDEATHSIG, SIGTERM);
-#endif
-}
-
-static void
 session_worker_job_child_watch (GPid                 pid,
                                 int                  status,
                                 GdmSessionWorkerJob *job)
@@ -241,7 +232,7 @@ gdm_session_worker_job_spawn (GdmSessionWorkerJob *session_worker_job,
                                         (char **) args->pdata,
                                         (char **)env->pdata,
                                         G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD | 
G_SPAWN_FILE_AND_ARGV_ZERO,
-                                        (GSpawnChildSetupFunc)session_worker_job_child_setup,
+                                        NULL,
                                         session_worker_job,
                                         &session_worker_job->priv->pid,
                                         NULL,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]