diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 8138b8798d8c0..bf8c521bff9f1 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -64,6 +64,10 @@ #include "include/types.h" #include "common/BackTrace.h" +#ifdef HAVE_SYS_PRCTL_H +#include +#endif + #define dout_subsys ceph_subsys_rgw using namespace std; @@ -517,6 +521,12 @@ int main(int argc, const char **argv) realm_watcher.add_watcher(RGWRealmNotify::Reload, reloader); realm_watcher.add_watcher(RGWRealmNotify::ZonesNeedPeriod, pusher); +#if defined(HAVE_SYS_PRCTL_H) + if (prctl(PR_SET_DUMPABLE, 1) == -1) { + cerr << "warning: unable to set dumpable flag: " << cpp_strerror(errno) << std::endl; + } +#endif + wait_shutdown(); derr << "shutting down" << dendl;