4 ms·
How do they keep eye on all the processes for a service. They don't seem to use namespaces.
by satai 9y ago
How do they keep eye on all the processes for a service. They don't seem to use namespaces.
- SolarNet 9y agoIn what way don't they use namespaces? It's object oriented using a lisp system (hence arbitrary macro support for lexical and dynamic scoping). Each service object would track its own processes.
- cyphar 9y agoI'm trying to read the code now. I'm not sure whether I do or don't want them to use cgroups. Anything is better than using ptrace.
- m-j-fox 9y agoAren't cgroups a Linux thing? Don't know if Hurd has them.
- bonzini 9y agoCgroups are just an API. I think there was an effort to add a translator for them on top of the Hurd, possibly as a Summer of Code project.
- cyphar 9y agoGNU Shepherd works on GNU/Linux as well as GNU/Hurd. The problem is that Linux doesn't really have any sane way of tracking double-forked processes. A misuse of the cgroup API is to do that (and I do mean misuse, reading cgroups.proc is not atomic and will cause repetitions and dropped entries if you read more than a single page of data). But that's still better than using ptrace's POSIX-breaking pseudo-parent semantics (see Upstart, though they apparently switched to using the proc connector API which is sort of like ptrace-lite). I would presume they'd separate out that particular detail into separate modules.
- gens 9y agoI don't know what they use. I do know that you can use the proc events over "connector" to get all the forks and execs. That is how I would do it.