r2286 - trunk/varnish-cache/bin/varnishd
Poul-Henning Kamp
phk at phk.freebsd.dk
Fri Dec 7 13:06:36 CET 2007
This should fix Eivinds Telnet problem.
Should go on the branch as well.
May be the same ting as Anders Nordby saw about a week ago on the branch.
Poul-Henning
In message <20071207120359.474991EC2B4 at projects.linpro.no>, phk at projects.linpro
.no writes:
>Author: phk
>Date: 2007-12-07 13:03:58 +0100 (Fri, 07 Dec 2007)
>New Revision: 2286
>
>Modified:
> trunk/varnish-cache/bin/varnishd/mgt_cli.c
> trunk/varnish-cache/bin/varnishd/mgt_event.h
>Log:
>TCP connections don't quite behave like other fds, and we need to handle
>that for the managers CLI event-engine:
>
>React to POLLNVAL as we would to POLLHUP
>
>
>Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c
>===================================================================
>--- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2007-11-23 10:47:16 UTC (rev 2285)
>+++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2007-12-07 12:03:58 UTC (rev 2286)
>@@ -301,7 +301,7 @@
>
> CAST_OBJ_NOTNULL(cp, e->priv, CLI_PORT_MAGIC);
>
>- if (what & (EV_ERR | EV_HUP))
>+ if (what & (EV_ERR | EV_HUP | EV_GONE))
> goto cli_close;
>
> /* grow the buffer if it is full */
>
>Modified: trunk/varnish-cache/bin/varnishd/mgt_event.h
>===================================================================
>--- trunk/varnish-cache/bin/varnishd/mgt_event.h 2007-11-23 10:47:16 UTC (rev 2285)
>+++ trunk/varnish-cache/bin/varnishd/mgt_event.h 2007-12-07 12:03:58 UTC (rev 2286)
>@@ -50,6 +50,7 @@
> #define EV_WR POLLOUT
> #define EV_ERR POLLERR
> #define EV_HUP POLLHUP
>+#define EV_GONE POLLNVAL
> #define EV_SIG -1
> int sig;
> unsigned sig_flags;
>
>_______________________________________________
>varnish-commit mailing list
>varnish-commit at projects.linpro.no
>http://projects.linpro.no/mailman/listinfo/varnish-commit
>
--
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-commit
mailing list