File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ extern "C" sig_handler handle_fatal_signal(int sig)
75
75
if (segfaulted)
76
76
{
77
77
my_safe_printf_stderr (" Fatal " SIGNAL_FMT " while backtracing\n " , sig);
78
- _exit ( 1 ); /* Quit without running destructors */
78
+ goto end;
79
79
}
80
80
81
81
segfaulted = 1 ;
@@ -301,9 +301,11 @@ extern "C" sig_handler handle_fatal_signal(int sig)
301
301
#ifndef __WIN__
302
302
/*
303
303
Quit, without running destructors (etc.)
304
+ Use a signal, because the parent (systemd) can check that with WIFSIGNALED
304
305
On Windows, do not terminate, but pass control to exception filter.
305
306
*/
306
- _exit (1 ); // Using _exit(), since exit() is not async signal safe
307
+ signal (sig, SIG_DFL);
308
+ kill (getpid (), sig);
307
309
#else
308
310
return ;
309
311
#endif
You can’t perform that action at this time.
0 commit comments