Flags for fchmodat()
lwn.net
lwn.net
Absolutely nuts that it took 5 attempts over 11 years to get in a <50 line patch that adds support for flags specified by POSIX.
[1] https://lkml.kernel.org/lkml/20140121105735.56cc4ec41a6f2071...
The chmod problem aside, how does this not seem crazy? Why in the world should a hard-coded filesystem path (let alone a particular mount point) be necessary to access some process-related kernel features? Would the sky fall down if they provided a non-filesystem way (read: a syscall...) to access useful functionality like all the other apparently-uncool kernels do?
I agree that it's kind of dumb to require it, but the reality of it is that nobody wants to make it work bad enough to fix it.
Yeah, it kind of is. But it's the best solution that works in the most cases, and fails in the least bad ways possible, given the constraints available. It's a hack, and technical debt. Sometimes that happens.
Fixing it properly by implementing `fchmodat2()` is (finally) going back and paying down that technical debt.
If it didn't seem crazy to someone, then probably no-one would have bothered addressing it.
You'd think they could provide a workaround for the whole thing in the interim by just providing a special open function (procfs_open?) that just opens the proc directory without caring if/where it's mounted?