suspend/resume in trouble...

Poul-Henning Kamp phk at
Thu Mar 23 10:06:44 CET 2006

I love it when I learn something, but I hate when it is a new bug in UNIX.

It seems that once you have listen(2)'ed a socket, there is no way to
unlisten(2) again.

I might intuitively be expected that listen(2) with a queue length
of zero would make it reject all future connection attempts, but
the semantics for that case is to accept the one connection and
reject all others while that connection exists.

So to implement suspend/resume we will have to close and recreate
the (remote) listener socket(s) which means that doing so moves
from the mgt to the cache process and that restarting the cache
process without a break in service is not possible any more.  (Unless
we resort to passing fd's over unix domain sockets, but I'm firmly
against that on religious reasons)

I've put the "suspend/resume" facility on the "needs further study"
for now.

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the varnish-dev mailing list