rgw: configurable exit timeout

Fixes: #3638

rgw exit timeout secs : number of seconds to wait for process
to exit cleanly before forcing exit. If set to 0, it'l wait
indefinitely.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
Yehuda Sadeh 2012-12-18 13:53:09 -08:00
parent 92b59e9059
commit a803159b02
2 changed files with 4 additions and 1 deletions

View File

@ -488,6 +488,7 @@ OPTION(rgw_s3_success_create_obj_status, OPT_INT, 0) // alternative success stat
OPTION(rgw_resolve_cname, OPT_BOOL, false) // should rgw try to resolve hostname as a dns cname record
OPTION(rgw_obj_stripe_size, OPT_INT, 4 << 20)
OPTION(rgw_extended_http_attrs, OPT_STR, "") // list of extended attrs that can be set on objects (beyond the default)
OPTION(rgw_exit_timeout_secs, OPT_INT, 120) // how many seconds to wait for process to go down before exiting unconditionally
OPTION(mutex_perf_counter, OPT_BOOL, false) // enable/disable mutex perf counter

View File

@ -252,7 +252,9 @@ static void godown_handler(int signum)
FCGX_ShutdownPending();
pprocess->close_fd();
signal(signum, sighandler_usr1);
alarm(5);
uint64_t secs = g_ceph_context->_conf->rgw_exit_timeout_secs;
if (secs)
alarm(secs);
}
static void godown_alarm(int signum)