From: Dave McCracken <dmccr@us.ibm.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] 2.4.9 Make thread group id visible in /proc/<pid>/status
Date: Mon, 20 Aug 2001 10:39:20 -0500 [thread overview]
Message-ID: <92830000.998321960@baldur> (raw)
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
dmccr@us.ibm.com 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 @@
"State:\t%s\n"
"Pid:\t%d\n"
"PPid:\t%d\n"
+ "TGid:\t%d\n"
"TracerPid:\t%d\n"
"Uid:\t%d\t%d\t%d\t%d\n"
"Gid:\t%d\t%d\t%d\t%d\n",
get_task_state(p),
- 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);
read_unlock(&tasklist_lock);
next reply other threads:[~2001-08-20 15:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-20 15:39 Dave McCracken [this message]
2001-08-20 16:19 ` [PATCH] 2.4.9 Make thread group id visible in /proc/<pid>/status Alan Cox
2001-08-20 16:26 ` Dave McCracken
2001-08-20 18:50 ` [PATCH] 2.4.9 Make thread group id visible in/proc/<pid>/status george anzinger
2001-08-20 18:59 ` Dave McCracken
2001-08-20 19:52 ` george anzinger
2001-08-20 20:03 ` Dave McCracken
2001-08-20 19:09 ` [PATCH] 2.4.9 Make thread group id visible in /proc/<pid>/status Miquel van Smoorenburg
2001-08-20 19:15 ` Ulrich Drepper
2001-08-20 19:30 ` Dave McCracken
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=92830000.998321960@baldur \
--to=dmccr@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.