mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:43:02 +01:00
Fix a bug where the shutdown handler could be called again
This commit is contained in:
parent
9ff9cb2a5a
commit
446b436a62
@ -646,7 +646,7 @@ static void signal_handler(int)
|
|||||||
++INET_SERVER_start;
|
++INET_SERVER_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shutdown_handler(int)
|
static void shutdown_handler(int shutdown_signal_code)
|
||||||
{
|
{
|
||||||
/**************************************
|
/**************************************
|
||||||
*
|
*
|
||||||
@ -655,11 +655,13 @@ static void shutdown_handler(int)
|
|||||||
**************************************
|
**************************************
|
||||||
*
|
*
|
||||||
* Functional description
|
* Functional description
|
||||||
* Forward sigterm signal to all child processes.
|
* Forward shutdown signal to all child processes.
|
||||||
*
|
*
|
||||||
**************************************/
|
**************************************/
|
||||||
|
|
||||||
kill(-1 * getpid(), SIGTERM);
|
signal(shutdown_signal_code, SIG_IGN);
|
||||||
|
|
||||||
|
kill(-1 * getpid(), shutdown_signal_code);
|
||||||
|
|
||||||
exit(FINI_OK);
|
exit(FINI_OK);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user