File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
93
93
const TEXT* prog_name = argv[0 ];
94
94
const TEXT* pidfilename = 0 ;
95
95
int guard_exit_code = 0 ;
96
+ int timeout_term = 30 ;
96
97
97
98
const TEXT* const * const end = argc + argv;
98
99
argv++;
@@ -117,9 +118,13 @@ int CLIB_ROUTINE main( int argc, char **argv)
117
118
case ' P' :
118
119
pidfilename = *argv++;
119
120
break ;
121
+ case ' T' :
122
+ timeout_term = atoi (*argv++);
123
+ break ;
120
124
default :
121
125
fprintf (stderr,
122
- " Usage: %s [-signore | -onetime | -forever (default)] [-daemon] [-pidfile filename]\n " ,
126
+ " Usage: %s [-signore | -onetime | -forever (default)] [-daemon] [-pidfile filename] "
127
+ " [-timeout seconds (default 30)]\n " ,
123
128
prog_name);
124
129
exit (-1 );
125
130
break ;
@@ -231,7 +236,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
231
236
{
232
237
if (shutdown_child)
233
238
{
234
- ret_code = UTIL_shutdown_child (child_pid, 3 , 1 );
239
+ ret_code = UTIL_shutdown_child (child_pid, timeout_term , 1 );
235
240
if (ret_code < 0 )
236
241
{
237
242
gds__log (" %s: error while shutting down %s (%d)\n " ,
You can’t perform that action at this time.
0 commit comments