Re: init / supervisor in jail
Andriy Gapon <[email protected]> Tue, 11 Nov 2025 14:14:47 +0200
| Newsgroups | gmane.os.freebsd.architechture |
|---|---|
| Message-ID | <11fb025b-6983-4f72-bf8a-50b83be0c872__3629.57603517629$1762863302$gmane$org@freebsd.org> |
On 10/11/2025 21:16, James Gritton wrote: > Far from being a kludge, I think it's a feature we need, and one at the top of > my list. Forcing it to look like PID 1 from jailed perspective is definitely > doable (and something I'd done outside of the project a decade ago). In > addition to those two requirements, I would add one that answers your last > question: > > 3. signals to init and reboot(2) work as they would on the host side. > > A jailed reboot would kill all processes and restart rc, and possibly do other > kernel-side cleanups yet to be clearly defined. A jailed halt would remove the > jail. A jailed single-user mode could exist where instead of init spawning a > shell, it just sits around while the system has a chance to jexec into it. > > init handles various signals by rebooting/halting/etc, and it should be able to > do that as it does now, by calling reboot(2), directing the kernel to do what it > needs to with the jail. If init goes away, it's probably like a halt and > removes the jail. > > This is definitely something that will be happening. Thank you very much. That's good to hear. -- Andriy Gapon