From: Ben Gras Date: Mon, 4 Jul 2005 09:36:16 +0000 (+0000) Subject: . Added printing of ppid to PM dump output X-Git-Tag: v3.1.0~650 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/FAQ?a=commitdiff_plain;h=08f67dcef77a2885b185b04367690eb5e5b463b4;p=minix.git . Added printing of ppid to PM dump output . made PM pid 0, own parent (so ppid 0) instead of -1 --- diff --git a/servers/is/dmp_pm.c b/servers/is/dmp_pm.c index 5b395a057..37af55be5 100644 --- a/servers/is/dmp_pm.c +++ b/servers/is/dmp_pm.c @@ -26,14 +26,14 @@ PUBLIC void mproc_dmp() getsysinfo(PM_PROC_NR, SI_PROC_TAB, mproc); - printf("-process- -nr-prnt- -pid/grp- --uid---gid-- -flags- --ignore--catch--block--\n"); + printf("-process- -nr-prnt- -pid/ppid/grp --uid--gid- -flags- --ignore--catch--block--\n"); for (i=prev_i; imp_pid == 0 && i != PM_PROC_NR) continue; if (++n > 22) break; - printf("%8.8s %4d%4d %4d%4d ", - mp->mp_name, i, mp->mp_parent, mp->mp_pid, mp->mp_procgrp); - printf("%d (%d) %d (%d) ", + printf("%8.8s %4d%4d %4d%4d%4d ", + mp->mp_name, i, mp->mp_parent, mp->mp_pid, mproc[mp->mp_parent].mp_pid, mp->mp_procgrp); + printf("%d(%d) %d(%d) ", mp->mp_realuid, mp->mp_effuid, mp->mp_realgid, mp->mp_effgid); printf("0x%04x ", mp->mp_flags); diff --git a/servers/pm/const.h b/servers/pm/const.h index dd6d96208..690d575af 100644 --- a/servers/pm/const.h +++ b/servers/pm/const.h @@ -17,7 +17,6 @@ */ #define PM_PID 0 /* PM's process id number */ -#define PM_PARENT -1 /* PM's parent process slot */ #define INIT_PID 1 /* INIT's process id number */ diff --git a/servers/pm/main.c b/servers/pm/main.c index 6d12bae32..fb15d0748 100644 --- a/servers/pm/main.c +++ b/servers/pm/main.c @@ -216,7 +216,7 @@ PRIVATE void pm_init() sigemptyset(&mproc[INIT_PROC_NR].mp_sigmask); mproc[PM_PROC_NR].mp_pid = PM_PID; - mproc[PM_PROC_NR].mp_parent = PM_PARENT; + mproc[PM_PROC_NR].mp_parent = PM_PROC_NR; sigfillset(&mproc[PM_PROC_NR].mp_ignore); sigfillset(&mproc[PM_PROC_NR].mp_sigmask);