Login
You're viewing the mstdn.social public feed.

Replies

  • 💬 1🔄 0⭐ 0
  • Jun 28, 2026, 8:13 AM

    @argv_minus_one @GnosticStreetSweeper @nixCraft

    They also have /proc, but not /sys. Linux’s sysfs serves largely the same purpose as sysctl on BSDs, but sysctl has a few benefits:

    • It’s structured and the types are introspectable (nodes also expose human-readable descriptions). The command-line tool that exposes them for scripting can provide the structure to scripts.
    • Reading or writing one is a single system call, not an open, read/write, close sequence.
    • They don’t look like files, so don’t fail in weird ways (e.g. requiring reads of specific sizes).
    • They don’t consume a file descriptor.

    Their one disadvantage is that they don’t automatically benefit from file-namespace sandboxing tools. On FreeBSD, for example, there’s an allow list for sysctls that can be used in Capsicum capability mode but there’s no way of adding a sysctl to that list.

    💬 1🔄 1⭐ 5
  • 💬 0🔄 0⭐ 0