[lkml]   [2001]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] 2.4.9 Make thread group id visible in /proc/<pid>/status

It would be useful in many contexts to be able to see the thread group id.
This would make it easier to identify tasks that are part of a
multi-threaded process, at least for those that are using pthreads. This
patch adds a TGid field to the status file. This will not break ps, since
ps skips any field in status that it doesn't understand.

Patch is below.

Dave McCracken

Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059 T/L 678-3059


--- linux-2.4.9/./fs/proc/array.c Thu Jul 26 15:42:56 2001
+++ linux-2.4.9-tgid/./fs/proc/array.c Mon Aug 20 10:05:18 2001
@@ -153,11 +153,12 @@
+ "TGid:\t%d\n"
- p->pid, p->pid ? p->p_opptr->pid : 0, 0,
+ p->pid, p->pid ? p->p_opptr->pid : 0, p->tgid, 0,
p->uid, p->euid, p->suid, p->fsuid,
p->gid, p->egid, p->sgid, p->fsgid);
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:57    [W:0.061 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site