Re: [PATCH 10/16] ptrace: clean transitions between TASK_STOPPED and TRACED

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tejun Heo
Date: Tuesday, December 21, 2010 - 10:31 am

On Mon, Dec 20, 2010 at 04:00:37PM +0100, Oleg Nesterov wrote:

Oops, left over from a previous waitqueue based implementation.


Hmmmm, I actually think that would be cleaner.  I just didn't know it
was there.  Will convert over to it.


Sure thing.


Updated.


Ah, thanks for spotting it.  I missed that.  We should be able to
convert it to call ptrace_stop(), right?


I see.  I can move the transition wait logic into PTRACE_ATTACH.
Would that be good enough?

This is also related to how to wait for attach completion for a new
more transparent attach.  Would it be better for such a request to
make sure the operation to complete before returning or is it
preferable to keep using wait(2) for that?  We'll probably be able to
share the transition wait logic with it.  I think it would be better
to return after the attach is actually complete but is there any
reason that I'm missing which makes using wait(2) preferrable?


I'm feeling a bit too dense to process the above right now.  I'll
respond to the above next morning after a strong cup of coffee. :-)


The GROUP_STOP_SIGMASK part of t->group_stop is supposed to track the
signr of the latest stop attempt.  Hmmm... but yeah, not changing the
value there would result in more consistent behavior.  Updating...


I see.  Removed.


Hmmm... and dropping current->exit_code clearing from the
do_signal_stop(), right?  I'm a bit confused about the use of
current->exit_code tho.  Why aren't we clearing it from ptrace_stop()?

Thanks.

-- 
tejun
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 10/16] ptrace: clean transitions between TASK_S ..., Tejun Heo, (Tue Dec 21, 10:31 am)