Skip to content

Commit

Permalink
Merge pull request #2987 from matt335672/fix_freebsd_core
Browse files Browse the repository at this point in the history
Don't generate a corefile when generating SIGSEGV
  • Loading branch information
metalefty authored Mar 14, 2024
2 parents ac67abe + 8e08066 commit 01d3ded
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/common/test_os_calls_signals.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ START_TEST(test_g_signal_child_stop_1)
pid = g_fork();
if (pid == 0)
{
// Before raising the signal, change directory to a non-writeable
// one to avoid generating a corefile.
g_set_current_dir("/");
raise(SIGSEGV);
}
ck_assert_int_ne(pid, 0);
Expand Down

0 comments on commit 01d3ded

Please sign in to comment.