]> git.ipfire.org Git - pakfire.git/commitdiff
jail: Don't fail if cgroup stats could not be read
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Nov 2023 17:42:29 +0000 (17:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 5 Nov 2023 17:42:29 +0000 (17:42 +0000)
This is kind of a fire and forget situation, but should be good enough.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/jail.c

index c7e314afea34819122663f6112744167820c50b8..8821dd9c44ad97feccdc8c89704a2d62ddf9e831 100644 (file)
@@ -2230,17 +2230,9 @@ static int __pakfire_jail_exec(struct pakfire_jail* jail, const char* argv[],
 ERROR:
        // Destroy the temporary cgroup (if any)
        if (ctx.cgroup) {
-#if 0
-               // XXX this is currently disabled because it overwrites r
                // Read cgroup stats
-               r = pakfire_cgroup_stat(ctx.cgroup, &ctx.cgroup_stats);
-               if (r) {
-                       ERROR(jail->pakfire, "Could not read cgroup stats: %m\n");
-               } else {
-                       pakfire_cgroup_stat_dump(ctx.cgroup, &ctx.cgroup_stats);
-               }
-#endif
-
+               pakfire_cgroup_stat(ctx.cgroup, &ctx.cgroup_stats);
+               pakfire_cgroup_stat_dump(ctx.cgroup, &ctx.cgroup_stats);
                pakfire_cgroup_destroy(ctx.cgroup);
                pakfire_cgroup_unref(ctx.cgroup);
        }