forwarding to list for common interest... On Tue, Nov 13, 2012 at 7:46 AM, Enlightenment SVN < [email protected]> wrote:
> Log: > by popular (overwhelming) demand, > -i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it now > prevents enlightenment_start from ptracing, which allows gdb attaching once > more > > > Author: discomfitor > Date: 2012-11-12 23:46:02 -0800 (Mon, 12 Nov 2012) > New Revision: 79202 > Trac: http://trac.enlightenment.org/e/changeset/79202 > > Modified: > trunk/e/src/bin/e_start_main.c > > Modified: trunk/e/src/bin/e_start_main.c > =================================================================== > --- trunk/e/src/bin/e_start_main.c 2012-11-13 06:52:52 UTC (rev 79201) > +++ trunk/e/src/bin/e_start_main.c 2012-11-13 07:46:02 UTC (rev 79202) > @@ -417,8 +417,9 @@ > else if (child == 0) > { > #ifdef HAVE_SYS_PTRACE_H > - /* in the child */ > - ptrace(PT_TRACE_ME, 0, NULL, NULL); > + if (!really_know) > + /* in the child */ > + ptrace(PT_TRACE_ME, 0, NULL, NULL); > #endif > execv(args[0], args); > return 0; /* We failed, 0 mean normal exit from E with no > restart or crash so let exit */ > @@ -431,11 +432,12 @@ > int status; > Eina_Bool done = EINA_FALSE; > #ifdef HAVE_SYS_PTRACE_H > - ptrace(PT_ATTACH, child, NULL, NULL); > + if (!really_know) > + ptrace(PT_ATTACH, child, NULL, NULL); > #endif > result = waitpid(child, &status, 0); > #ifdef HAVE_SYS_PTRACE_H > - if (!stop_ptrace) > + if ((!really_know) && (!stop_ptrace)) > { > if (WIFSTOPPED(status)) > ptrace(PT_CONTINUE, child, NULL, NULL); > @@ -459,7 +461,8 @@ > int back; > > #ifdef HAVE_SYS_PTRACE_H > - r = ptrace(PTRACE_GETSIGINFO, child, NULL, > &sig); > + if (!really_know) > + r = ptrace(PTRACE_GETSIGINFO, child, NULL, > &sig); > #endif > back = r == 0 && > sig.si_signo != SIGTRAP ? sig.si_signo : 0; > @@ -485,13 +488,15 @@ > sig.si_signo != SIGABRT)) > { > #ifdef HAVE_SYS_PTRACE_H > - ptrace(PT_CONTINUE, child, NULL, back); > + if (!really_know) > + ptrace(PT_CONTINUE, child, NULL, back); > #endif > continue ; > } > #ifdef HAVE_SYS_PTRACE_H > - /* E17 should be in pause, we can detach */ > - ptrace(PT_DETACH, child, NULL, back); > + if (!really_know) > + /* E17 should be in pause, we can detach */ > + ptrace(PT_DETACH, child, NULL, back); > #endif > /* And call gdb if available */ > if (home) > @@ -554,7 +559,8 @@ > kill(child, SIGSTOP); > usleep(200000); > #ifdef HAVE_SYS_PTRACE_H > - ptrace(PT_DETACH, child, NULL, NULL); > + if (!really_know) > + ptrace(PT_DETACH, child, NULL, NULL); > #endif > } > } > > > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > enlightenment-svn mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
