aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin Morrison <calvin@fastmailteam.com>2023-03-15 17:11:51 -0400
committerCalvin Morrison <calvin@fastmailteam.com>2023-03-15 17:11:51 -0400
commit141d5f110672352b1e4a5d4ef8a900166ac2901e (patch)
treec7450594eab9b10caa4d5d07e8ce2a09cf41d7f6
parent9384d9225dfde9f0feeee9c17fc88acebefb88f3 (diff)
signal handler is useless
-rw-r--r--fsbm.c8
1 files changed, 1 insertions, 7 deletions
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);