This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] btrace, x86: disable on some processors


On Fri, 22 Feb 2013 10:18:26 +0100, Metzger, Markus T wrote:
> > > +      status = ptrace (PTRACE_KILL, child, NULL, NULL);
> > > +      if (status != 0)
> > > +	warning (_("test branch tracing: cannot kill forked child: %s."),
> > > +		 strerror (errno));
> > > +      else
> > > +	{
> > > +	  pid = waitpid (child, &status, 0);
> 
> When I send SIGKILL and then PTRACE_KILL, should I wait unconditionally?
> 
> I.e. can we be sure that our child still ptraced when it receives the SIGKILL?

You should definitely get waitpid result in any case.

I would not care about checking results of SIGKILL or PTRACE_KILL.


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]