env: add conditional compile to remove rlimit code
- for environments that don't support rlimits Change-Id: I6dde1eb9e1cb2274462a450625d8bc70a3889163 Signed-off-by: John Meneghini <johnm@netapp.com> Reviewed-on: https://review.gerrithub.io/386355 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
5de74d085d
commit
70b1de2d03
@ -297,12 +297,14 @@ spdk_app_start(struct spdk_app_opts *opts, spdk_event_fn start_fn,
|
|||||||
|
|
||||||
spdk_log_set_print_level(opts->print_level);
|
spdk_log_set_print_level(opts->print_level);
|
||||||
|
|
||||||
|
#ifndef SPDK_NO_RLIMIT
|
||||||
if (opts->enable_coredump) {
|
if (opts->enable_coredump) {
|
||||||
struct rlimit core_limits;
|
struct rlimit core_limits;
|
||||||
|
|
||||||
core_limits.rlim_cur = core_limits.rlim_max = RLIM_INFINITY;
|
core_limits.rlim_cur = core_limits.rlim_max = RLIM_INFINITY;
|
||||||
setrlimit(RLIMIT_CORE, &core_limits);
|
setrlimit(RLIMIT_CORE, &core_limits);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
config = spdk_conf_allocate();
|
config = spdk_conf_allocate();
|
||||||
assert(config != NULL);
|
assert(config != NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user