Mailing List Archive

r1067 - trunk/varnish-cache/bin/varnishd
Author: phk
Date: 2006-09-18 11:33:10 +0200 (Mon, 18 Sep 2006)
New Revision: 1067

Modified:
trunk/varnish-cache/bin/varnishd/mgt_child.c
trunk/varnish-cache/bin/varnishd/mgt_cli.c
Log:
Increase CLI respone timeout to 5 seconds and tell that
a ping has failed before we kill the child.


Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-18 09:25:57 UTC (rev 1066)
+++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-18 09:33:10 UTC (rev 1067)
@@ -86,8 +86,10 @@
(void)what;
if (child_state != CH_RUNNING)
return (1);
- if (child_pid > 0 && mgt_cli_askchild(NULL, NULL, "ping\n"))
+ if (child_pid > 0 && mgt_cli_askchild(NULL, NULL, "ping\n")) {
+ fprintf(stderr, "Child not responding to ping\n");
kill(child_pid, SIGKILL);
+ }
return (0);
}


Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-18 09:25:57 UTC (rev 1066)
+++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-18 09:33:10 UTC (rev 1067)
@@ -212,7 +212,7 @@
return (CLIS_COMMS);
}

- i = cli_readres(cli_i, &u, resp, 3.0);
+ i = cli_readres(cli_i, &u, resp, 5.0);
if (status != NULL)
*status = u;
return (u == CLIS_OK ? 0 : u);