Don't generate a corefile when generating SIGSEGV

One of the tests uses a child process which generates SIGSEGV.
On FreeBSD this generates a corefile by default which breaks
the 'make distcheck' process.
This commit is contained in:
matt335672 2024-03-09 17:01:40 +00:00
parent ac67abe9b6
commit 8e08066bc8

View File

@ -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);