patch-2.1.130 linux/fs/proc/array.c
Next file: linux/fs/select.c
Previous file: linux/fs/nfs/write.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Sun Nov 22 11:38:46 1998
- Orig file:
v2.1.129/linux/fs/proc/array.c
- Orig date:
Thu Nov 12 16:21:23 1998
diff -u --recursive --new-file v2.1.129/linux/fs/proc/array.c linux/fs/proc/array.c
@@ -617,7 +617,7 @@
if ((tsk)->tss.esp0 > PAGE_SIZE && \
MAP_NR((tsk)->tss.esp0) < max_mapnr) \
eip = ((struct pt_regs *) (tsk)->tss.esp0)->pc; \
- eip; })
+ eip; })
#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->tss.usp)
#elif defined(__powerpc__)
#define KSTK_EIP(tsk) ((tsk)->tss.regs->nip)
@@ -701,16 +701,24 @@
static inline char * task_state(struct task_struct *p, char *buffer)
{
+ int g;
+
buffer += sprintf(buffer,
"State:\t%s\n"
"Pid:\t%d\n"
"PPid:\t%d\n"
"Uid:\t%d\t%d\t%d\t%d\n"
- "Gid:\t%d\t%d\t%d\t%d\n",
+ "Gid:\t%d\t%d\t%d\t%d\n"
+ "Groups:\t",
get_task_state(p),
p->pid, p->p_pptr->pid,
p->uid, p->euid, p->suid, p->fsuid,
p->gid, p->egid, p->sgid, p->fsgid);
+
+ for (g = 0; g < p->ngroups; g++)
+ buffer += sprintf(buffer, "%d ", p->groups[g]);
+
+ buffer += sprintf(buffer, "\n");
return buffer;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov