|
|
|
|
|
by caf
4179 days ago
|
|
The /proc/sys/ and sysctl(2) methods are really just down to which syscall is used to talk to the kernel - either way it's just reading or writing a kernel-side data structure, there's no fundamental difference there. The /proc/sys/ pseudo-filesystem interface has the advantage that it's discoverable. The sysctl(2) interface requires userspace to have knowledge of a swag of hardcoded ID numbers identifying each node in the sysctl tree. |
|
Compare that to the freebsd man page [1]
[0] http://man7.org/linux/man-pages/man2/sysctl.2.html#NOTES
[1] https://www.freebsd.org/cgi/man.cgi?query=sysctl&sektion=3&m...