Skip to content

Commit 45fdd23

Browse files
committed
allow NULL process_name
1 parent cf5ba58 commit 45fdd23

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

unix/startstop.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ start_set_self_args(int argc, char *argv[])
7474
void
7575
start_enable_stacktrace(const char *process_name)
7676
{
77+
if (!process_name) {
78+
process_name = self_argv[0];
79+
}
7780
backtrace_state_var = backtrace_create_state(process_name, 0, NULL, NULL);
7881
sigaction(SIGSEGV, &(struct sigaction) { .sa_handler = fatal_signal_handler }, NULL);
7982
sigaction(SIGILL, &(struct sigaction) { .sa_handler = fatal_signal_handler }, NULL);

0 commit comments

Comments
 (0)