From: David van Moolenbroek Date: Sat, 5 Sep 2015 16:21:53 +0000 (+0200) Subject: procfs: do not list init in /proc/services X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=refs%2Fchanges%2F74%2F3074%2F1;p=minix.git procfs: do not list init in /proc/services It is not a system service. Change-Id: Ibfbf08aa52095826c19172e517bcbd292e7944a0 --- diff --git a/minix/fs/procfs/service.c b/minix/fs/procfs/service.c index a7ed9eba9..e9f88496c 100644 --- a/minix/fs/procfs/service.c +++ b/minix/fs/procfs/service.c @@ -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); } /*