Andrew Clayton
Andrew Clayton
@i4ki For the initial implementation we've decided to just follow what the rest of the isolation code does and if we can't put a process in a cgroup we will...
Changes this time around :- - During configure output if we found cgroupv2 support. - If we fail to place a process in a cgroup, fail that process and log...
Changes - If we failt to add a process to a cgroup, try and clean up the directories that we may have created.
> Please remember to push once after the rebase and once again after the changes (in no specific order), so that github doesn't mess with the interdiff. I think you...
Changes:- - Don't leak memory from looping getline(3) - Re-arrange includes in src/nxt_cgroup.c - Re-appropriate ENODATA for when we don't find a cgroupv2 entry in /proc/self/cgroup - Fix variable shadowing...
The following patch seems to do the trick, but it's late and I may have missed something... (may be missing some error checking...) ```diff diff --git a/src/nxt_socket.c b/src/nxt_socket.c index a8e0d514..9a82bd61...
> $runstatedir is where the control socket lives. It should be 755. ```shell $ ls -ld /tmp/unit/var/run/unit/ drwxr-xr-x 2 andrew andrew 40 Aug 6 04:24 /tmp/unit/var/run/unit/ ``` Assuming that mkdir...
> BTW, I didn't yet discern what this function does exactly. I know it creates the control socket, and I know it doesn't create the listeners, but is it used...
Ooh, I forgot about the pid file, good point. While the pid file is created OK, we should perhaps not count on it and maybe the pid is being created...
> > ```diff > > + socket_dir = nxt_strdup(sa->u.sockaddr_un.sun_path); > > ``` > > Why `nxt_strdup()` and not `nxt_str_dup()`? With the latter, you don't need to free it. Probably because...