1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-12 11:45:24 +02:00

bugix: fix thread inturruption detection

This commit is contained in:
Grigory Smolkin 2019-03-31 11:22:17 +03:00
parent f0de44e0fa
commit fb4c3ffdc0

View File

@ -130,13 +130,13 @@ exit_if_necessary(int elevel)
/* If this is not the main thread then don't call exit() */
if (main_tid != pthread_self())
{
/* Interrupt other possible routines */
thread_interrupted = true;
#ifdef WIN32
ExitThread(elevel);
#else
pthread_exit(NULL);
#endif
/* Interrupt other possible routines */
thread_interrupted = true;
}
else
exit(elevel);