From f235682eeacb78d21567c00d1c065934db5ff850 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Wed, 14 Dec 2022 13:40:08 +0100 Subject: [PATCH] Revert f432f5416ab1a1eb5216092c3dd992cc4b1f4510. The issue I was seeing turned out to be caused by juliaup. --- Project.toml | 2 +- src/BugReporting.jl | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index 0b9aaf6..d983ef9 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "BugReporting" uuid = "bcf9a6e7-4020-453c-b88e-690564246bb8" authors = ["Keno Fischer ", "Tim Besard "] -version = "0.3.1" +version = "0.3.2" [deps] Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" diff --git a/src/BugReporting.jl b/src/BugReporting.jl index 9c9849f..b9ba9ee 100644 --- a/src/BugReporting.jl +++ b/src/BugReporting.jl @@ -422,10 +422,12 @@ function handle_child_error(p::Base.Process) # If the child instead signalled, we recreate the same signal in ourselves # by first disabling Julia's signal handling and then killing ourselves. - ccall(:sigaction, Cint, (Cint, Ptr{Cvoid}, Ptr{Cvoid}), p.termsignal, C_NULL, C_NULL) - ccall(:kill, Cint, (Cint, Cint), getpid(), p.termsignal) - # XXX: why doesn't raise() work? - #ccall(:raise, Cint, (Cint,), p.termsignal) + # NOTE: signal is deprecated in favor of sigaction, + # but the sigaction struct is nontrivial and platform-dependent. + ccall(:signal, Ptr{Cvoid}, (Cint, Ptr{Cvoid}), p.termsignal, C_NULL) + ccall(:raise, Cint, (Cint,), p.termsignal) + # NOTE: when switching to sigaction, we somehow need to use kill instead of raise + #ccall(:kill, Cint, (Cint, Cint), getpid(), p.termsignal) end end