mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +01:00
Backported #7468: Add switch to control in guardian timeout before killing firebird server process
(cherry picked from commit 96aad0d6c8
)
This commit is contained in:
parent
ffd448aa12
commit
9ce968c5d9
@ -92,6 +92,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 = 3;
|
||||
|
||||
const TEXT* const* const end = argc + argv;
|
||||
argv++;
|
||||
@ -116,9 +117,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 3)]\n",
|
||||
prog_name);
|
||||
exit(-1);
|
||||
break;
|
||||
@ -224,7 +229,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",
|
||||
|
Loading…
Reference in New Issue
Block a user