LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: dmccr@us.ibm.com (Dave McCracken),
	torvalds@transmeta.com (Linus Torvalds),
	linux-kernel@vger.kernel.org (Linux Kernel)
Subject: Re: [PATCH] Provide system call to get task id
Date: Mon, 08 Oct 2001 22:53:41 +0100	[thread overview]
Message-ID: <12421.1002578021@redhat.com> (raw)
In-Reply-To: <E15qcua-00010T-00@the-village.bc.nu>
In-Reply-To: <E15qcua-00010T-00@the-village.bc.nu>


While we're at it, we should probably be exporting the tgid from 
/proc/$pid/status.

Index: fs/proc/array.c
===================================================================
RCS file: /inst/cvs/linux/fs/proc/array.c,v
retrieving revision 1.5.2.32
diff -u -r1.5.2.32 array.c
--- fs/proc/array.c	2001/08/07 08:10:59	1.5.2.32
+++ fs/proc/array.c	2001/10/08 21:52:30
@@ -151,12 +151,13 @@
 	read_lock(&tasklist_lock);
 	buffer += sprintf(buffer,
 		"State:\t%s\n"
+		"Tgid:\t%d\n"
 		"Pid:\t%d\n"
 		"PPid:\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),
+		get_task_state(p), p->tgid,
 		p->pid, p->pid ? p->p_opptr->pid : 0, 0,
 		p->uid, p->euid, p->suid, p->fsuid,
 		p->gid, p->egid, p->sgid, p->fsgid);

--
dwmw2



      parent reply	other threads:[~2001-10-08 21:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-08 15:46 Dave McCracken
2001-10-08 15:52 ` Christoph Hellwig
2001-10-08 16:07   ` Alan Cox
2001-10-08 16:05 ` Alan Cox
2001-10-08 17:44   ` Linus Torvalds
2001-10-08 17:52     ` Alan Cox
2001-10-08 18:17       ` Linus Torvalds
2001-10-08 22:15         ` Miquel van Smoorenburg
2001-10-08 21:53   ` David Woodhouse [this message]

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=12421.1002578021@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dmccr@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --subject='Re: [PATCH] Provide system call to get task id' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).