lkml.org 
[lkml]   [2003]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 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


--- linux-2.5.69/fs/binfmt_elf.c.~1~ Sun May 4 16:53:14 2003
+++ linux-2.5.69/fs/binfmt_elf.c Tue May 6 13:16:37 2003
@@ -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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.057 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site