of Conservative Garbage Collectors", POPL 2001
(http://www.hpl.hp.com/techreports/2001/HPL-2001-251.html).
-GC_RETRY_SIGNALS, GC_NO_RETRY_SIGNALS - Try to compensate for lost
+GC_RETRY_SIGNALS - Try to compensate for lost
thread suspend and restart signals (Pthreads only).
On by default for OSF1 (Tru64) or if the library is
sanitized, off otherwise. Since we've previously seen
similar issues on some other operating systems, it
was turned into a runtime flag to enable last-minute
- work-arounds.
+ work-arounds. "0" value means "do not retry signals".
GC_USE_GETWRITEWATCH=<n> - Only if MPROTECT_VDB and GWW_VDB are both defined
(Win32 only). Explicitly specify which strategy of
{
# if !defined(GC_OPENBSD_UTHREADS) && !defined(NACL)
struct sigaction act;
+ char *str;
if (SIGNAL_UNSET == GC_sig_suspend)
GC_sig_suspend = SIG_SUSPEND;
if (sigdelset(&suspend_handler_mask, GC_sig_thr_restart) != 0)
ABORT("sigdelset failed");
- /* Check for GC_RETRY_SIGNALS. */
- if (0 != GETENV("GC_RETRY_SIGNALS")) {
- GC_retry_signals = TRUE;
- }
- if (0 != GETENV("GC_NO_RETRY_SIGNALS")) {
- GC_retry_signals = FALSE;
+ /* Override the default value of GC_retry_signals. */
+ str = GETENV("GC_RETRY_SIGNALS");
+ if (str != NULL) {
+ if (*str == '0' && *(str + 1) == '\0') {
+ /* Do not retry if the environment variable is set to "0". */
+ GC_retry_signals = FALSE;
+ } else {
+ GC_retry_signals = TRUE;
+ }
}
if (GC_retry_signals) {
GC_COND_LOG_PRINTF(