8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 07:23:03 +01:00

front-port - override ulimit setting for DEV_BUILD

This commit is contained in:
alexpeshkoff 2007-01-15 17:37:21 +00:00
parent e6c41da662
commit 094ac1f8c7

View File

@ -33,6 +33,7 @@
#include "firebird.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#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 */