Does a pipe take a socket ... ?

Matthew Dillon dillon at apollo.backplane.com
Tue May 15 18:27:10 UTC 2007


:Marc G. Fournier wrote:
: > For those that remmeber the other day, I had that swzone issue, where I ran out 
: > of swap space?  I just about hit it again today, swap was up to 99% used ... I 
: > was able to get a ps listing in, and there were a whack of find processes 
: > running ...
: > 
: > Now, I think I know which VPS they were running in, so that isn't a problem ... 
: > and I suspect that the find was just part of a longer pipe ... I'm just curious 
: > if those pipes would happen to use up any of those sockets that are 
: > 'evaporating', or is this totally unrelated to sockets?
:
:In FreeBSD, pipe() is implemented with the socketpair(2)
:system call.  Every pipe uses two sockets (one for each
:endpoint).
:
:Best regards
:   Oliver
:
:-- 
:Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.

    Nuh uh.  pipe() is a direct implementation... no sockets anywhere.

    Using socketpair() will eat sockets up, but using pipe() will not.

					-Matt


More information about the freebsd-stable mailing list