]> Zhao Yanbai Git Server - minix.git/commitdiff
procfs: do not list init in /proc/services 74/3074/1
authorDavid van Moolenbroek <david@minix3.org>
Sat, 5 Sep 2015 16:21:53 +0000 (18:21 +0200)
committerDavid van Moolenbroek <david@minix3.org>
Mon, 7 Sep 2015 22:56:19 +0000 (22:56 +0000)
It is not a system service.

Change-Id: Ibfbf08aa52095826c19172e517bcbd292e7944a0

minix/fs/procfs/service.c

index a7ed9eba978d3eca857c595fe6ec4b7d3fdf6c17..e9f88496ca27a7d17c114d9c91c9a59d7da2673d 100644 (file)
@@ -163,8 +163,13 @@ static int
 service_active(index_t slot)
 {
 
+       /*
+        * Init is in RS's process tables as the representation of user
+        * processes.  It is not a system service.
+        */
        return ((rproc.proc[slot].r_flags & (RS_IN_USE | RS_ACTIVE)) ==
-           (RS_IN_USE | RS_ACTIVE));
+           (RS_IN_USE | RS_ACTIVE) &&
+          rproc.pub[slot].endpoint != INIT_PROC_NR);
 }
 
 /*