From f08bbf83a7dbf7caa9d2104e42f3fb6c692e03f2 Mon Sep 17 00:00:00 2001 From: nick black Date: Wed, 8 Apr 2020 21:29:24 -0400 Subject: [PATCH] notcurses-input: join ticker thread on exit --- src/input/input.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/input/input.cpp b/src/input/input.cpp index 65383d1f2..5b5db8171 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -246,6 +246,8 @@ int main(void){ } if((r == 'D' || r == 'd') && ni.ctrl){ + done = true; + tid.join(); return EXIT_SUCCESS; } if(!n->cursor_move(y, 0)){ @@ -305,5 +307,7 @@ int main(void){ if(r == (char32_t)-1 && e){ std::cerr << "Error reading from terminal (" << strerror(e) << "?)\n"; } + done = true; + tid.join(); return EXIT_FAILURE; }