Skip to content

Commit

Permalink
fix: taosbenchmark handle ctrl-c (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
sangshuduo committed Nov 23, 2022
1 parent fb66a64 commit fab042d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/benchMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ int main(int argc, char* argv[]) {

benchSetSignal(SIGINT, benchQueryInterruptHandler);

pthread_cancel(spid);
pthread_join(spid, NULL);
#endif
if (bench_parse_args(argc, argv)) {
return -1;
Expand Down Expand Up @@ -119,5 +117,10 @@ int main(int argc, char* argv[]) {
}
postFreeResource();

#ifdef LINUX
pthread_cancel(spid);
pthread_join(spid, NULL);
#endif

return ret;
}

0 comments on commit fab042d

Please sign in to comment.