4 ms·
In Unix everything is a file. Linux is not Unix but tries to be like Unix. This all files represent a resource on the system. It’s hard to separate this from PO
by grepfru_it 3y ago
In Unix everything is a file. Linux is not Unix but tries to be like Unix. This all files represent a resource on the system. It’s hard to separate this from POSIX requirements. Lose POSIX compatibility and you end up with a half implemented system like Windows. And then you must recreate the entire application ecosystem yourself or you end up with this funky BeOS/Haiku style POSIX compatibility layer that excludes a good subset of applications that already exist.
PS /proc isn’t a file system, it is an api (that can be accessed by the file system)
- nerdponx 3y agoHow do you access the contents of /proc programmatically?
- nurettin 3y agoread/select loop? Or am I too outdated?
- ww520 3y agocat, fopen, fread, fwrite, etc.
- nerdponx 3y agoRight, so it's an API, but it's only usable through the file system, and it's a pretty bad API. You still need to parse the crappy ad hoc format instead of getting a struct from the kernel.
- grepfru_it 3y agoYep. So the trade off is then app compatibility or a radical new interface
- josephg 3y agoIf it were in Linux it would probably make sense to keep both interfaces, for the time being. Existing apps can use the current interface, and newer apps can opt in to a fancier interface / api.