[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201109100317.03979.vda.linux@googlemail.com>
Date: Sat, 10 Sep 2011 03:17:03 +0200
From: Denys Vlasenko <vda.linux@...glemail.com>
To: "Indan Zupancic" <indan@....nu>
Cc: "Oleg Nesterov" <oleg@...hat.com>, "Tejun Heo" <tj@...nel.org>,
"Denys Vlasenko" <dvlasenk@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: Why I want PTRACE_O_TRACESTOP option
On Saturday 10 September 2011 01:09, Indan Zupancic wrote:
> On Fri, September 9, 2011 18:26, Oleg Nesterov wrote:
> > On 09/09, Indan Zupancic wrote:
> >>
> >> It is very useful to set options atomically at SEIZE time.
> >
> > Nobody argues with this.
> >
> >> Another important reason to make PTRACE_O_TRACESTOP an option is
> >> because not everyone uses SEIZE: Users using PTRACE_TRACEME can't
> >> set this option at all.
> >
> > Yes. This was already discussed, PTRACE_TRACEME obviously doesn't
> > work if you need the new features. So far it was decided TRACEME
> > should be avoided,
>
> How do you want to attach/seize a just forked child without races
> in a less ugly way than with TRACEME?
I needed to do it when I was adding usage of SEIZE to strace.
It goes like this:
- fork
- child: raise(SIGSTOP)
- parent: waits until it sees child stopping
- parent: seizes the child
- parent: kill(child, SIGCONT)
--
vda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists