From hurd-bug Mon Jul 22 13:57:45 2013 From: Pino Toscano Date: Mon, 22 Jul 2013 13:57:45 +0000 To: hurd-bug Subject: Re: [PATCH 3/8] initscripts: use pidof -s /sbin/init for robustness Message-Id: <201307221557.49900.toscano.pino () tiscali ! it> X-MARC-Message: https://marc.info/?l=hurd-bug&m=137450455917060 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart1805423.iVCEMiuliV" --nextPart1805423.iVCEMiuliV Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Alle marted=EC 9 luglio 2013, Justus Winter ha scritto: > pidof -s returns the first matching process. Since readdir(2) on > procfs returns the processes in ascending order, this returns the > first process. This is more robust if there is more than one > /sbin/init process. >=20 > Currently on Hurd there are two /sbin/init processes. Are you sure there are two /sbin/init process around, when using=20 sysvinit? Back then in my experiments, I remember one /hurd/init (as of=20 now) and /sbin/init, and I had to fix procfs so `pidof /sbin/init` would=20 actually match exactly and not go into fuzzy search (which would find=20 /hurd/init and /sbin/init). =2D-=20 Pino Toscano --nextPart1805423.iVCEMiuliV Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iD8DBQBR7TpdTNH2piB/L3oRAj80AKDGs60JhCVJjneJ3bDfo9EaZFYctACfY6mN 7u02DzTGMxQ0RA2sodW+RIg= =dAC9 -----END PGP SIGNATURE----- --nextPart1805423.iVCEMiuliV--