This solves the same problem as 7fa1d2d (cgroup_helper shan't hold socket for outer_helper process), but goes a bit further by eliminating the entire class of the problem by closing every single file descriptor that isn't actually used by the forked process.
This ensures that long-lived helper processes do not accidentally hold open file descriptors on which parent processes might be waiting for EOF on.
This solves the same problem as 7fa1d2d (cgroup_helper shan't hold socket for outer_helper process), but goes a bit further by eliminating the entire class of the problem by closing every single file descriptor that isn't actually used by the forked process.
This ensures that long-lived helper processes do not accidentally hold open file descriptors on which parent processes might be waiting for EOF on.