From 79e709d06d5f49dbcfd47cc1c6777f16b2d52953 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 12 May 2014 17:37:04 +0900 Subject: [PATCH] enable ptrace of yama ptrace scope disabled on linux this apparently re-enabled ptracing if the kernel says "nooo". @fix Conflicts: src/bin/e_main.c --- src/bin/e_main.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/bin/e_main.c b/src/bin/e_main.c index ed58cfd8c..00a74993a 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -1,10 +1,15 @@ #include "e.h" + +#ifdef __linux__ +# include +#endif + +#define MAX_LEVEL 80 + #ifdef HAVE_ECORE_IMF # include #endif -#define MAX_LEVEL 64 - #define TS_DO #ifdef TS_DO # define TS(x) \ @@ -170,6 +175,15 @@ main(int argc, char **argv) double t = 0.0, tstart = 0.0; char *s = NULL, buff[32]; struct sigaction action; + +#ifdef __linux__ +# ifdef PR_SET_PTRACER +# ifdef PR_SET_PTRACER_ANY + prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY); +# endif +# endif +#endif + #ifdef TS_DO t0 = t1 = t2 = ecore_time_unix_get(); #endif