[TUHS] sockets (was Re: First appearance of named pipes)

Tony Finch dot at dotat.at
Tue Mar 10 03:09:02 AEST 2020


Norman Wilson <norman at oclsc.org> wrote:
>
> I wish POSIX and Linux and the BSDs would catch up; that
> was only 30 years ago.

After sockets were added to BSD, pipe() was implemented using them. But it
was a slightly different implementation than socketpair().

e.g.
https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_syscalls.c

and the amusing comment at the top of
https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_pipe.c

But the socket-backed pipes weren't bidirectional even though they could
have been - see this fix in FreeBSD
https://svnweb.freebsd.org/base/head/sys/kern/uipc_syscalls.c?r1=12843&r2=13146

Which did not last long because socket-backed pipe were soon replaced
with a new (bidirectional) implementation
https://svnweb.freebsd.org/base/head/sys/kern/sys_pipe.c?view=log&log_pagestart=200#rev13675

Tony.
-- 
f.anthony.n.finch  <dot at dotat.at>  http://dotat.at/
Ardnamurchan Point to Cape Wrath: South or southwest 4 or 5, increasing 6 to
gale 8, then veering west later. Rough or very rough, occasionally high in
west. Rain or drizzle, then showers. Moderate or good, occasionally poor at
first.


More information about the TUHS mailing list