From 141d5f110672352b1e4a5d4ef8a900166ac2901e Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Wed, 15 Mar 2023 17:11:51 -0400 Subject: signal handler is useless --- fsbm.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'fsbm.c') diff --git a/fsbm.c b/fsbm.c index 80559ff..08aeb96 100644 --- a/fsbm.c +++ b/fsbm.c @@ -30,9 +30,6 @@ char *netdev_path = "/proc/net/dev"; struct iface *interfaces = NULL; size_t no_iface = 0; -void endHandler(int signum) { - q = true; -} void print_bps(double bytesPerSecond) { const char* prefixes[] = { "", "k", "M", "G", "T", "P", "E", "Z", "Y" }; @@ -209,12 +206,9 @@ int main(int argc, char **argv) { exit(EXIT_FAILURE); } - // Catch SIGINT - signal(SIGINT, endHandler); - // populate first. print_stats(); - while (!q) { + while (1) { print_stats(); printf("\n"); fflush(stdout); -- cgit v1.2.3