Skip to content

Commit d7fa831

Browse files
committed
Write heartbeat thread output to the safe crash log
In `jl_safe_printf()`, we're already writing to the safe crash log if we're in signal handler context (in addition to writing to `stderr`). Now we do the same if we're in the heartbeat thread.
1 parent 14d3b3d commit d7fa831

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jl_uv.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ JL_DLLEXPORT void jl_safe_printf(const char *fmt, ...)
747747
// order is important here: we want to ensure that the threading infra
748748
// has been initialized before we start trying to print to the
749749
// safe crash log file
750-
if (jl_sig_fd != 0 && jl_inside_signal_handler()) {
750+
if (jl_sig_fd != 0 && (jl_inside_signal_handler() || jl_inside_heartbeat_thread()) {
751751
print_error_msg_as_json(buf);
752752
}
753753
if (write(STDERR_FILENO, buf, strlen(buf)) < 0) {

0 commit comments

Comments
 (0)