Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you allow this:

open("/fuse/sockets/www.whatever.com/tcp/80", "r+")

Then what do you do with these?

/fuse/sockets/www.whatever.com/tcp /fuse/sockets/www.whatever.com /fuse/sockets

They and other variations would each need different semantics, some allowing rw, some ro, some wo, and some not being allowed at all. Some path segments would not allow arbitrary names (tcp/udp, port number) while others require a specific format (host/ip) and others are arbitrary. Some have to be directories, some have to be files, and some are neither. None of this is very filesystem-like. I think the current design is right: opening sockets is kind of special, but you get a filehandle that is very much like an ordinary filehandle.



> Then what do you do with these?

The same things you do with any other incomplete path name. I don't see why this is an issue at all.


There's no such thing as an "incomplete path name", those have to be directories.


So treat them as directories (or more specifically, as mount points). I still don't see the problem.


Treat them as empty, read only directories?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: