From d6fe8250b2d7baa0d5b53b61e111cbf73e1cd234 Mon Sep 17 00:00:00 2001 From: sky Date: Tue, 2 Sep 2008 17:54:33 +0000 Subject: [PATCH] If you attach gdb to a running varnish child, then when you tell it to continue it will abort if assertions are enabled due to poll returning with EINTR. This just re-enters the loop. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3155 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_cli.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/varnish-cache/bin/varnishd/cache_cli.c b/varnish-cache/bin/varnishd/cache_cli.c index f437edb7..7bb8ec8c 100644 --- a/varnish-cache/bin/varnishd/cache_cli.c +++ b/varnish-cache/bin/varnishd/cache_cli.c @@ -153,6 +153,8 @@ CLI_Run(void) pfd[0].fd = heritage.cli_in; pfd[0].events = POLLIN; i = poll(pfd, 1, -1); + if (i == -1 && errno == EINTR) + continue; assert(i == 1); if (pfd[0].revents & POLLHUP) { fprintf(stderr, -- 2.39.5