diff options
author | Eugene Tarassov | 2012-04-03 15:40:27 +0000 |
---|---|---|
committer | Eugene Tarassov | 2012-04-03 15:40:27 +0000 |
commit | 255a1f313175ffeabb4d9edd9a9fd8b70b7b77f9 (patch) | |
tree | befaabd2f250590d634fc1bc98f145d367565b24 /agent/system | |
parent | ec65aa075a66f5c0f31f662d1d119b5a1a4809ee (diff) | |
download | org.eclipse.tcf.agent-255a1f313175ffeabb4d9edd9a9fd8b70b7b77f9.tar.gz org.eclipse.tcf.agent-255a1f313175ffeabb4d9edd9a9fd8b70b7b77f9.tar.xz org.eclipse.tcf.agent-255a1f313175ffeabb4d9edd9a9fd8b70b7b77f9.zip |
TCF Agent: fixed intermittent context detach error "Cannot resume .. No such process".
Diffstat (limited to 'agent/system')
-rw-r--r-- | agent/system/GNU/Linux/tcf/context-linux.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/agent/system/GNU/Linux/tcf/context-linux.c b/agent/system/GNU/Linux/tcf/context-linux.c index ba2101bb..d6ffca6e 100644 --- a/agent/system/GNU/Linux/tcf/context-linux.c +++ b/agent/system/GNU/Linux/tcf/context-linux.c @@ -457,8 +457,8 @@ int context_continue(Context * ctx) { send_context_started_event(ctx); return 0; } - trace(LOG_ALWAYS, "error: ptrace(PTRACE_CONT, ...) failed: ctx %#lx, id %s, error %d %s", - ctx, ctx->id, err, errno_to_str(err)); + trace(LOG_ALWAYS, "error: ptrace(%d, ...) failed: ctx %#lx, id %s, error %d %s", + cmd, ctx, ctx->id, err, errno_to_str(err)); errno = err; return -1; } @@ -478,9 +478,9 @@ int context_continue(Context * ctx) { send_process_exited_event(prs); } else if (ext->detach_req && !ext->sigstop_posted) { + assert(ctx->exiting); assert(ext->waitpid_posted); - if (tkill(ext->pid, SIGSTOP) < 0) return -1; - ext->sigstop_posted = 1; + if (tkill(ext->pid, SIGSTOP) >= 0) ext->sigstop_posted = 1; } return 0; } |