ToyBox init

2019-05-04 Thread Jeff
> maybe you should have a look at the tiny "oneit" utility that is > part of/included in ToyBox ( http://landley.net/toybox/ ): ToyBox also provides its own rewrite of BusyBox init which is (almost ?) compatible with the latter but consists of less code. it is licensed under the very permissive T

race condition in killall

2019-05-04 Thread sysinit
> pkill(1), killall(1) and killall5(8) all retrieve a process list and > kill them one by one, instead of calling kill(-1, signal), so a race > condition can happen thats let some process escape the final SIGKILL. interesting. i have not considered this at all. looks like kill( -1, sig ) from pr

is it required to call kill() from process #1 ?

2019-05-04 Thread Jeff
> Before the reboot(2) system call, at some point you need to > kill all processes ("kill -9 -1") so you can unmount filesystems > and *then* call reboot(2). indeed. > That's relying on a behaviour that Linux implements, and possibly > BSD too, but that is not specified in POSIX: that the proce