8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:40:38 +01:00

Implemented #7468: Add switch to control in guardian timeout before killing firebird server process

This commit is contained in:
AlexPeshkoff 2023-02-07 20:24:38 +03:00
parent 0a54663469
commit 71a27ce507

View File

@ -93,6 +93,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
const TEXT* prog_name = argv[0];
const TEXT* pidfilename = 0;
int guard_exit_code = 0;
int timeout_term = 30;
const TEXT* const* const end = argc + argv;
argv++;
@ -117,9 +118,13 @@ int CLIB_ROUTINE main( int argc, char **argv)
case 'P':
pidfilename = *argv++;
break;
case 'T':
timeout_term = atoi(*argv++);
break;
default:
fprintf(stderr,
"Usage: %s [-signore | -onetime | -forever (default)] [-daemon] [-pidfile filename]\n",
"Usage: %s [-signore | -onetime | -forever (default)] [-daemon] [-pidfile filename] "
"[-timeout seconds (default 30)]\n",
prog_name);
exit(-1);
break;
@ -231,7 +236,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
{
if (shutdown_child)
{
ret_code = UTIL_shutdown_child(child_pid, 3, 1);
ret_code = UTIL_shutdown_child(child_pid, timeout_term, 1);
if (ret_code < 0)
{
gds__log("%s: error while shutting down %s (%d)\n",