Skip to contentSkip to conversation

core dump psinfo.pr_sname letter fix

PATCH New Roland McGrath 1 participant 1 message May 6, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 core dump psinfo.pr_sname letter fix

I noticed this a long time ago and forgot that it was still broken in 2.5. This patch makes the state letter in the pr_sname field in core dumps correct for stopped and zombie threads. The order needed to be changed when the TASK_* values changed. This matches the letters used in sched.c:show_task.

Thanks,
Roland

fs/binfmt_elf.c renamed from fs/binfmt_elf.c.~1~ +1 -1
@@ -1105,7 +1105,7 @@ static void fill_psinfo(struct elf_prpsi
 
 	i = p->state ? ffz(~p->state) + 1 : 0;
 	psinfo->pr_state = i;
-	psinfo->pr_sname = (i < 0 || i > 5) ? '.' : "RSDZTD"[i];
+	psinfo->pr_sname = (i < 0 || i > 5) ? '.' : "RSDTZW"[i];
 	psinfo->pr_zomb = psinfo->pr_sname == 'Z';
 	psinfo->pr_nice = task_nice(p);
 	psinfo->pr_flag = p->flags;