diff --git a/src/signal.cpp b/src/signal.cpp index f1f4f9cff..15a475f53 100644 --- a/src/signal.cpp +++ b/src/signal.cpp @@ -35,8 +35,12 @@ bool ScopedInterruptHandler::HandleInterrupt() const { D_ASSERT(context); } - // We're presumably still blocking interrupts here in the R session, - // so this is likely equivalent to cpp11::safe[Rf_onintrNoResume]() + // This seems necessary to work around a specificity with the RStudio IDE on Windows. + // Without the message, the interrupt is not available as a catchable condition. + // https://github.com/krlmlr/cancel.test/issues/1 + cpp11::message(""); + + // FIXME: Is this equivalent to cpp11::safe[Rf_onintrNoResume](), or worse? cpp11::safe[Rf_onintr](); return true; }