diff --git a/src/remote/inet_server.cpp b/src/remote/inet_server.cpp index 82350a1814..700af6922d 100644 --- a/src/remote/inet_server.cpp +++ b/src/remote/inet_server.cpp @@ -33,6 +33,7 @@ #include "firebird.h" #include #include +#include #include "../jrd/common.h" #include "../jrd/isc_proto.h" #include "../jrd/divorce.h" @@ -279,6 +280,25 @@ int CLIB_ROUTINE server_main( int argc, char** argv) set_signal(SIGUSR2, signal_handler); #endif +#if defined(UNIX) && defined(DEV_BUILD) + { + // try to force core files creation for DEV_BUILD + struct rlimit core; + if (getrlimit(RLIMIT_CORE, &core) == 0) + { + core.rlim_cur = core.rlim_max; + if (setrlimit(RLIMIT_CORE, &core) != 0) + { + gds__log("setrlimit() failed, errno=%d", errno); + } + } + else + { + gds__log("getrlimit() failed, errno=%d", errno); + } + } +#endif + /* Fork off a server, wait for it to die, then fork off another, but give up after 100 tries */