linprocfs: Continue on error when reading process limits
Continue on error when reading process limits.
Fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283726
Most text utilities with capsicum(4) enabled fail when reading /compat/linux/proc/*/limits because both LINUX_RLIMIT_SIGPENDING & LINUX_RLIMIT_MSGQUEUE call kernel_sysctlbyname.
The alternative would be to make the variables accessed by the kern.sigqueue.max_pending_per_proc & kern.ipc.msgmnb sysctl's public. This was done for reading /proc/cpuinfo in https://github.com/freebsd/freebsd-src/commit/d74a742704eb81f0c6f4aa83e4cb0de26a81c400
@bsdimp can we merge this? I've been using successfully without issues.
@lemul What do you think? I think this is good, but a second set of eyes would be good.
Well, I'm not object it, but what sense to hide permission error from the user?
Well, I'm not object it, but what sense to hide permission error from the user?
The intention is not to hide an error but to fetch the rest of the information because the sysctl fails with Capsicum enabled. We can either ignore the error or make the variables public to avoid making a sysctl call like it was done for cpuinfo here:
https://github.com/freebsd/freebsd-src/commit/d74a742704eb81f0c6f4aa83e4cb0de26a81c400
ping
Ooops. Missed the exchange back in June.
I'll land this now. In the future, the commit message should have "PR:
Automated message from ghpr: Thank you for your submission. This PR has been merged to FreeBSD's branch. These changes will appear shortly on our GitHub mirror.