Pádraig Brady <p...@draigbrady.com> writes: > V2 attached with comments.
Thanks! That makes things easier to understand. I did some similar testing to you, and everything seems to work as expected: $ podman run --rm -it localhost/coreutils-env:latest $ cat /sys/fs/cgroup/cpu.max max 100000 $ ./src/nproc 16 $ podman run --rm -it --cpus=8 localhost/coreutils-env:latest $ cat /sys/fs/cgroup/cpu.max 800000 100000 ./src/nproc 8 $ docker run --rm -it coreutils-env:latest $ cat /sys/fs/cgroup/cpu.max max 100000 $ ./src/nproc 16 $ docker run --rm -it --cpus=8 coreutils-env:latest $ cat /sys/fs/cgroup/cpu.max 800000 100000 $ ./src/nproc 8 I assume you have a NEWS entry ready for Coreutils. This is a nice change that deserves a mention, in my opinion. Thanks for working on it. One very minor thing to add to Bruno's points: > #include <limits.h> > +#if HAVE_MNTENT_H > +# include <mntent.h> > +#endif Since you added a dependency on the 'mntent-h' the header can always be included. I would just remove the "#if HAVE_MNTENT_H". Having less of those to worry about is always nice. Collin