On Tue, May 04, 2021 at 01:35:50PM -0400, Greg Stark wrote:
> Fwiw, I have a suspicion that the right check for being init is
> whether `pid == ppid`.
pryzbyj(at)pryzbyj:~$ ps -wwf 1
UID PID PPID C STIME TTY STAT TIME CMD
root 1 0 0 2020 ? Ss 10:28 /sbin/init
As I recall, on some OS, pid 0 is the "swapper".
--
Justin