[sysprof] turbostat: remove prctl



commit 5ff150d365ca2087a91d8da7a6b57a703f409088
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jul 31 13:20:05 2019 -0700

    turbostat: remove prctl
    
    This won't be reliable since our handlers are run on threads.

 src/sysprofd/sysprof-turbostat.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)
---
diff --git a/src/sysprofd/sysprof-turbostat.c b/src/sysprofd/sysprof-turbostat.c
index 7c3fc73..4c6301d 100644
--- a/src/sysprofd/sysprof-turbostat.c
+++ b/src/sysprofd/sysprof-turbostat.c
@@ -23,20 +23,13 @@
 #include "sysprof-turbostat.h"
 
 #include <errno.h>
-#include <fcntl.h>
 #include <glib-unix.h>
 #include <math.h>
 #include <signal.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/ioctl.h>
-#include <termios.h>
 #include <unistd.h>
 
-#ifdef __linux__
-# include <sys/prctl.h>
-#endif
-
 struct _SysprofTurbostat
 {
   GPid        pid;
@@ -85,14 +78,6 @@ sysprof_turbostat_free (SysprofTurbostat *self)
   g_rc_box_release_full (self, sysprof_turbostat_finalize);
 }
 
-static void
-child_setup_cb (gpointer data)
-{
-#ifdef __linux__
-  prctl (PR_SET_PDEATHSIG, SIGTERM);
-#endif
-}
-
 static gboolean
 sysprof_turbostat_watch_cb (GIOChannel   *channel,
                             GIOCondition  cond,
@@ -237,7 +222,7 @@ sysprof_turbostat_start (SysprofTurbostat  *self,
                                 (gchar **)argv,
                                 env,
                                 (G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL),
-                                child_setup_cb,
+                                NULL,
                                 NULL,
                                 &self->pid,
                                 NULL,


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