diff --git a/src/dnode/src/dnodeSystem.c b/src/dnode/src/dnodeSystem.c index dcbf249a51024c7aa5569a379633804934f3746c..b7ca6f053c3d25bd9754b69549200b902c59c919 100644 --- a/src/dnode/src/dnodeSystem.c +++ b/src/dnode/src/dnodeSystem.c @@ -146,7 +146,9 @@ int32_t main(int32_t argc, char *argv[]) { dInfo("TDengine is shut down!"); closelog(); +#ifdef WINDOWS tsem_post(&exitSem); +#endif return EXIT_SUCCESS; } @@ -172,5 +174,7 @@ static void sigintHandler(int32_t signum) { // inform main thread to exit tsem_post(&exitSem); +#ifdef WINDOWS tsem_wait(&exitSem); +#endif } \ No newline at end of file