add helper function to set 'interruptThrown'
this fixes a linker failure on cygwin 64 due to some bad interaction between tls and shared libraries. see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697
This commit is contained in:
parent
d35231ec60
commit
804ac52489
|
@ -259,7 +259,7 @@ int handleExceptions(const string & programName, std::function<void()> fun)
|
|||
condition is discharged before we reach printMsg()
|
||||
below, since otherwise it will throw an (uncaught)
|
||||
exception. */
|
||||
interruptThrown = true;
|
||||
setInterruptThrown();
|
||||
throw;
|
||||
}
|
||||
} catch (Exit & e) {
|
||||
|
|
|
@ -946,7 +946,12 @@ void closeOnExec(int fd)
|
|||
|
||||
bool _isInterrupted = false;
|
||||
|
||||
thread_local bool interruptThrown = false;
|
||||
static thread_local bool interruptThrown = false;
|
||||
|
||||
void setInterruptThrown()
|
||||
{
|
||||
interruptThrown = true;
|
||||
}
|
||||
|
||||
void _interrupted()
|
||||
{
|
||||
|
|
|
@ -267,7 +267,7 @@ void closeOnExec(int fd);
|
|||
|
||||
extern bool _isInterrupted;
|
||||
|
||||
extern thread_local bool interruptThrown;
|
||||
void setInterruptThrown();
|
||||
|
||||
void _interrupted();
|
||||
|
||||
|
|
Loading…
Reference in a new issue