[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/8] initscripts: use pidof -s /sbin/init for robustness
From: |
Justus Winter |
Subject: |
Re: [PATCH 3/8] initscripts: use pidof -s /sbin/init for robustness |
Date: |
Mon, 22 Jul 2013 17:14:28 +0200 |
User-agent: |
alot/0.3.4 |
Quoting Pino Toscano (2013-07-22 15:57:45)
> Alle martedì 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.
> >
> > Currently on Hurd there are two /sbin/init processes.
>
> Are you sure there are two /sbin/init process around, when using
> sysvinit? Back then in my experiments, I remember one /hurd/init (as of
> now) and /sbin/init, and I had to fix procfs so `pidof /sbin/init` would
> actually match exactly and not go into fuzzy search (which would find
> /hurd/init and /sbin/init).
Sounds crazy, but yes, I'm somewhat sure:
Mounting local filesystems...done.
+ grep init
root 1 - Sslo 0:00.02 /hurd/init root=device:hd0s1 console=com0
root 6 - Sslo 0:00.01 init boot
root 12 co Ssfow 0:00.00 init boot
root 13 co So 0:00.01 /bin/sh /etc/init.d/rc S
root 416 co Sow 0:00.03 /bin/sh /etc/init.d/mountall.sh start
root 493 co So 0:00.00 grep init
+ pidof /sbin/init
12 6
+ set +x
Justus
- patches for sysvinit, debian repository for testing, Justus Winter, 2013/07/09
- [PATCH 2/8] initscripts: add -ocompatible to procfs mounts on Hurd, Justus Winter, 2013/07/09
- [PATCH 1/8] initscripts: hurd has a proper tmpfs now, remove workaround, Justus Winter, 2013/07/09
- [PATCH 3/8] initscripts: use pidof -s /sbin/init for robustness, Justus Winter, 2013/07/09
- [PATCH 7/8] sendsigs, killprocs: Disable on Hurd. killall5 kills essential processes., Justus Winter, 2013/07/09
- [PATCH 4/8] initscripts: add runsystem.sysv, Justus Winter, 2013/07/09
- [PATCH 5/8] initscripts: Disable rootcheck on Hurd, Justus Winter, 2013/07/09
- [PATCH 6/8] killall5.c: Use sysconf(_SC_SYMLOOP_MAX) instead of MAXSYMLINKS., Justus Winter, 2013/07/09
- [PATCH 8/8] sysvinit: Fix getty path in /etc/inittab on Hurd., Justus Winter, 2013/07/09