[master] 3e454cf Now that varnishtest sets up SIGHUP, remove hacks.
Poul-Henning Kamp
phk at FreeBSD.org
Sat Jan 13 00:33:09 UTC 2018
commit 3e454cf29a958a9b8b29aa98dc2891896faf9218
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Sat Jan 13 00:32:00 2018 +0000
Now that varnishtest sets up SIGHUP, remove hacks.
diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c
index a051716..1fed3cb 100644
--- a/bin/varnishhist/varnishhist.c
+++ b/bin/varnishhist/varnishhist.c
@@ -397,7 +397,6 @@ do_curses(void *arg)
timeout(delay * 1000);
switch ((ch = getch())) {
case ERR:
- quit = 1;
break;
#ifdef KEY_RESIZE
case KEY_RESIZE:
diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c
index 9f8c432..56d442f 100644
--- a/bin/varnishstat/varnishstat_curses.c
+++ b/bin/varnishstat/varnishstat_curses.c
@@ -37,7 +37,6 @@
#include <unistd.h>
#include <string.h>
#include <signal.h>
-#include <poll.h>
#include <stdint.h>
#include <math.h>
@@ -981,7 +980,6 @@ delpt(void *priv, const struct VSC_point *const vpt)
void
do_curses(struct vsm *vsm, struct vsc *vsc, double delay)
{
- struct pollfd pollfd;
long t;
int ch;
double now;
@@ -996,9 +994,6 @@ do_curses(struct vsm *vsm, struct vsc *vsc, double delay)
nonl();
curs_set(0);
- pollfd.fd = STDIN_FILENO;
- pollfd.events = POLLIN;
-
make_windows();
doupdate();
@@ -1025,12 +1020,10 @@ do_curses(struct vsm *vsm, struct vsc *vsc, double delay)
draw_screen();
t = (t_sample + interval - now) * 1000;
- if (t > 0)
- (void)poll(&pollfd, 1, t);
+ timeout(t);
switch (ch = wgetch(w_status)) {
case ERR:
- keep_running = 0;
break;
#ifdef KEY_RESIZE /* sigh, Solaris lacks this.. */
case KEY_RESIZE:
diff --git a/bin/varnishtop/varnishtop.c b/bin/varnishtop/varnishtop.c
index 582edbd..f0fa320 100644
--- a/bin/varnishtop/varnishtop.c
+++ b/bin/varnishtop/varnishtop.c
@@ -279,7 +279,6 @@ do_curses(void *arg)
switch (getch()) {
case ERR:
- quit = 1;
break;
#ifdef KEY_RESIZE
case KEY_RESIZE:
More information about the varnish-commit
mailing list