summaryrefslogtreecommitdiff
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorDave Jones <davej@codemonkey.org.uk>2003-01-08 02:55:25 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-01-08 02:55:25 -0800
commitbe814fae2ceced0c6aec816faa4ea869aa36dc3b (patch)
treea19f685ac90185728d2e5d18fa6e6d082f7e845f /fs/proc/array.c
parent9d07a3a18d284dd26e616c7eefd278c8ad6a2be4 (diff)
[PATCH] tracer pid.
Can't remember where this came from, but its been around for quite a while. Prints the parent (tracer) pid if its being traced.
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r--fs/proc/array.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 4dae164bc85a..fd826e15234c 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -161,7 +161,8 @@ static inline char * task_state(struct task_struct *p, char *buffer)
"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->tgid,
- p->pid, p->pid ? p->real_parent->pid : 0, 0,
+ p->pid, p->pid ? p->real_parent->pid : 0,
+ p->pid && p->ptrace ? p->parent->pid : 0,
p->uid, p->euid, p->suid, p->fsuid,
p->gid, p->egid, p->sgid, p->fsgid);
read_unlock(&tasklist_lock);