|
|
@ -102,6 +102,8 @@ namespace i2p |
|
|
|
LogPrint(eLogError, "Daemon: limits.openfiles exceeds system limit: ", limit.rlim_max); |
|
|
|
LogPrint(eLogError, "Daemon: limits.openfiles exceeds system limit: ", limit.rlim_max); |
|
|
|
} |
|
|
|
} |
|
|
|
uint32_t cfsize; i2p::config::GetOption("limits.coresize", cfsize); |
|
|
|
uint32_t cfsize; i2p::config::GetOption("limits.coresize", cfsize); |
|
|
|
|
|
|
|
if (cfsize) // core file size set
|
|
|
|
|
|
|
|
{ |
|
|
|
cfsize *= 1024; |
|
|
|
cfsize *= 1024; |
|
|
|
getrlimit(RLIMIT_CORE, &limit); |
|
|
|
getrlimit(RLIMIT_CORE, &limit); |
|
|
|
if (cfsize <= limit.rlim_max) { |
|
|
|
if (cfsize <= limit.rlim_max) { |
|
|
@ -116,6 +118,7 @@ namespace i2p |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
LogPrint(eLogError, "Daemon: limits.coresize exceeds system limit: ", limit.rlim_max); |
|
|
|
LogPrint(eLogError, "Daemon: limits.coresize exceeds system limit: ", limit.rlim_max); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Pidfile
|
|
|
|
// Pidfile
|
|
|
|
// this code is c-styled and a bit ugly, but we need fd for locking pidfile
|
|
|
|
// this code is c-styled and a bit ugly, but we need fd for locking pidfile
|
|
|
|