3 ms·
As I see it from my own programming experience, the main value of "everything is a file" philosophy is in the unified namespace. Except sockets are file descrip
by chetanahuja 13y ago
As I see it from my own programming experience, the main value of "everything is a file" philosophy is in the unified namespace. Except sockets are file descriptors but not in the filesystem namespace... except when they are "unix domain". The process identifiers aren't have their own namespace but they are sorta in the filesystem via the linux specific /proc. And of course there's the sysv shared memory which comes with it's own namspace (except if you mmap an actual filesystem node and just... ugh... open it from two different process). Sigh.
- zorbo 13y agoFrom what I've always understood, the philosophy isn't "everything is a file" (the unified namespace variant), but "everything is a file descriptor" (the API kind).
- chetanahuja 13y agoWell my point was that I personally find the idea of a unified namespace for global system objects (files, pipes, sockets, processes etc) more powerful than the idea of a unified namespace of fd's within a single process.
- justincormack 13y ago/proc is not Linux specific it came from Solaris and is pretty widespread now. Linux has bizarre named Unix domain sockets of two flavours one with names in the filesystem and one with names in another namespace...