pc->program_pid is only correct if LOCAL_ACTIVE(), tt->this_task is always
fine even if REMOTE().
Signed-off-by: Oleg Nesterov <oleg(a)redhat.com>
---
tools.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools.c b/tools.c
index afc6cb3..fef262d 100644
--- a/tools.c
+++ b/tools.c
@@ -1787,7 +1787,7 @@ cmd_set(void)
return;
if (ACTIVE()) {
- set_context(NO_TASK, pc->program_pid);
+ set_context(tt->this_task, NO_PID);
show_context(CURRENT_CONTEXT());
return;
}
--
2.5.0