From: Siesh1oo Date: Mon, 10 Mar 2014 19:23:55 +0000 (+0100) Subject: - libs/ezsat/ezminisat.cc: use sigemptyset() to clear sig_action.sa_mask; use SA_RES... X-Git-Tag: yosys-0.3.0~57^2~1^2~6^2~1^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d091be401140088431ac2c1bf2bc97415e37c9ff;p=yosys.git - libs/ezsat/ezminisat.cc: use sigemptyset() to clear sig_action.sa_mask; use SA_RESTART flag for improved robustness of code that is not signal-aware. --- diff --git a/libs/ezsat/ezminisat.cc b/libs/ezsat/ezminisat.cc index 92f56b00a..4677f68bd 100644 --- a/libs/ezsat/ezminisat.cc +++ b/libs/ezsat/ezminisat.cc @@ -176,8 +176,8 @@ contradiction: if (solverTimeout > 0) { sig_action.sa_handler = alarmHandler; - sig_action.sa_mask = 0; - sig_action.sa_flags = 0; + sigemptyset(&sig_action.sa_mask); + sig_action.sa_flags = SA_RESTART; alarmHandlerThis = this; alarmHandlerTimeout = clock() + solverTimeout*CLOCKS_PER_SEC; old_alarm_timeout = alarm(0);