Skip to content

Commit 7705cb0

Browse files
committed
Don't handle SIGINT in tests
1 parent 2ff80e8 commit 7705cb0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/ark/src/sys/unix/interface.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ pub fn setup_r(mut args: Vec<*mut c_char>) {
4646

4747
Rf_initialize_R(args.len() as i32, args.as_mut_ptr() as *mut *mut c_char);
4848

49-
// Initialize the signal blocks and handlers (like interrupts)
50-
initialize_signal_handlers();
49+
// Initialize the signal blocks and handlers (like interrupts).
50+
// Don't do that in tests because that makes them uninterruptible.
51+
if !harp::IS_TESTING {
52+
initialize_signal_handlers();
53+
}
5154

5255
// Mark R session as interactive
5356
// (Should have also been set by call to `Rf_initialize_R()`)

0 commit comments

Comments
 (0)