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; i<NR_PROCS; i++) {
mp = &mproc[i];
if (mp->mp_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);
*/
#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 */
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);