diff options
author | Eugene Tarassov | 2012-03-26 22:42:00 +0000 |
---|---|---|
committer | Eugene Tarassov | 2012-03-26 22:42:00 +0000 |
commit | d9bacfaa08d997e12734a23a1d60ab067302bfc9 (patch) | |
tree | f5fe10ff52f1032e1a0b5ac81cbd3964eb47ba83 /agent/system | |
parent | e6e95c506eff2c91b0720652d9dfc686d5b940d0 (diff) | |
download | org.eclipse.tcf.agent-d9bacfaa08d997e12734a23a1d60ab067302bfc9.tar.gz org.eclipse.tcf.agent-d9bacfaa08d997e12734a23a1d60ab067302bfc9.tar.xz org.eclipse.tcf.agent-d9bacfaa08d997e12734a23a1d60ab067302bfc9.zip |
TCF Agent: fixed intermittent assertion failure in context detach implementation on Linux.
Diffstat (limited to 'agent/system')
-rw-r--r-- | agent/system/GNU/Linux/tcf/context-linux.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/agent/system/GNU/Linux/tcf/context-linux.c b/agent/system/GNU/Linux/tcf/context-linux.c index a981637c..180946ff 100644 --- a/agent/system/GNU/Linux/tcf/context-linux.c +++ b/agent/system/GNU/Linux/tcf/context-linux.c @@ -463,6 +463,7 @@ int context_continue(Context * ctx) { while (l != &prs->children) { Context * c = cldl2ctxp(l); l = l->next; + assert(!c->stopped); if (!c->exited) { free_regs(c); send_context_exited_event(c); @@ -1040,6 +1041,12 @@ static void event_pid_stopped(pid_t pid, int signal, int event, int syscall) { } ext = EXT(ctx); + if (ext->detach_done) { + if (ext->pid != EXT(ctx->mem)->pid || (EXT(ctx->mem)->attach_mode & CONTEXT_ATTACH_SELF) == 0) { + detach_waitpid_process(); + } + return; + } assert(!ctx->exited); assert(!ext->attach_callback); if (signal == SIGSTOP) ext->sigstop_posted = 0; |