mirror of
https://github.com/Z3Prover/z3
synced 2026-07-02 13:26:10 +00:00
* fix #7603: race condition in Ctrl-C handling * fix race in cancel_eh * fix build
This commit is contained in:
parent
7a8ba4b474
commit
b1ab695eb6
9 changed files with 49 additions and 44 deletions
|
|
@ -23,17 +23,9 @@ Revision History:
|
|||
|
||||
struct scoped_ctrl_c {
|
||||
event_handler & m_cancel_eh;
|
||||
bool m_first;
|
||||
bool m_once;
|
||||
bool m_enabled;
|
||||
void (STD_CALL *m_old_handler)(int);
|
||||
scoped_ctrl_c * m_old_scoped_ctrl_c;
|
||||
public:
|
||||
// If once == true, then the cancel_eh is invoked only at the first Ctrl-C.
|
||||
// The next time, the old signal handler will take over.
|
||||
// if enabled == false, then scoped_ctrl_c is a noop
|
||||
scoped_ctrl_c(event_handler & eh, bool once=true, bool enabled=true);
|
||||
scoped_ctrl_c(event_handler & eh, bool enabled = true);
|
||||
~scoped_ctrl_c();
|
||||
void reset() { m_first = true; }
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue