[TUHS] If not Linux, then what?

Bakul Shah bakul at bitblocks.com
Wed Aug 28 09:16:18 AEST 2019

On Tue, 27 Aug 2019 15:40:02 -0700 Larry McVoy <lm at mcvoy.com> wrote:
Larry McVoy writes:
> and I can tell you that sockets are WAY WAY better.  I get the "it
> should have just been file I/O" except that I don't.  I tried to 
> write a library that let you open up /net/tcp/$host:$port and do
> I/O like it was a file descriptor.  That works for a lot of stuff
> but I ran into problems quickly.  A networking connection is not
> a file handle.  You can make some stuff work but I couldn't figure
> out how to do all of it.   You end up having to do ioctls to handle
> the stuff that doesn't fit well into the file system name space.
> I think plan 9 did this sort of thing, maybe Rob can prove me wrong
> or remember where it didn't match.

Plan9 does a decent enough job.

cpu% ls /net/tcp

cpu% ls /net/tcp/1

cpu% cd /net/tcp/1
cpu% cat local remote!17010!52027

See http://doc.cat-v.org/plan_9/4th_edition/papers/net/

Replacing ioctls with writing ascii commands to ctl files was
a significant improvement. For one thing you can do all this
from a shell script. 

plan9 would've been a big improvement over *BSD or Linux. But
I think a conceptual merge was needed between some sane
version of Unix and plan9 so as to not throw out all the dusty

More information about the TUHS mailing list