There's a race condition when detaching simultaneous to a clone vis:
- frysk sends detach to Task object
- Task object receives detach, sends stop to kernel task
- Task object receives clone
At this point the Task-object can detach, but the clone cannot:
- the clone _probably_ hasn't yet stopped; ptrace.detach(clone) will fail
- the owning proc doesn't know about clone; so won't wait for it to detach
2005-11-21 Andrew Cagney <email@example.com>
* Proc.java (performTaskAttachCompleted(Task,Task)): Add
* ProcState.java: Handle performTaskAttachCompleted.
* TaskState.java: In .detaching, when a clone, notify owning
process of the clone Task. Replace .initial with .mainState,
.unattachedState, and .clonedState. Replace .Stating states with
.Start states. Simplify.
* Task.java: Update.