1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Fix to get core files on Solaris

This commit is contained in:
monty@bitch.mysql.fi
2001-08-22 12:22:46 +03:00
parent afd8a6db48
commit b2c030e894
4 changed files with 15 additions and 12 deletions

View File

@ -205,11 +205,17 @@ resolve it\n");
/* Produce a core for the thread */
#ifdef HAVE_WRITE_CORE
#ifdef HAVE_LINUXTHREADS
void write_core(int sig)
{
signal(sig, SIG_DFL);
if (fork() != 0) exit(1); // Abort main program
// Core will be written at exit
}
#endif /* HAVE_WRITE_CORE */
#else
void write_core(int sig)
{
signal(sig, SIG_DFL);
pthread_kill(pthread_self(), sig);
}
#endif