diff options
author | Robert Swiecki <robert@swiecki.net> | 2018-11-06 17:52:03 +0100 |
---|---|---|
committer | Robert Swiecki <robert@swiecki.net> | 2018-11-06 17:52:03 +0100 |
commit | 5a05828a98a04d396f07f5f79c939da08ff2a7e5 (patch) | |
tree | f76571e6dc9d86b8f8da1fa79db76c31e6fe9baa /subproc.c | |
parent | 6eb82f66a13f13de6075d8c6309245c756e7f8fc (diff) | |
download | honggfuzz-5a05828a98a04d396f07f5f79c939da08ff2a7e5.tar.gz |
cmdline: implement RLIMIT_CORE setting - proper setting
Diffstat (limited to 'subproc.c')
-rw-r--r-- | subproc.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -187,14 +187,12 @@ static bool subproc_PrepareExecv(run_t* run) { } #endif /* ifdef RLIMIT_DATA */ #ifdef RLIMIT_CORE - if (run->global->exe.dataLimit) { - const struct rlimit rl = { - .rlim_cur = run->global->exe.coreLimit * 1024ULL * 1024ULL, - .rlim_max = run->global->exe.coreLimit * 1024ULL * 1024ULL, - }; - if (setrlimit(RLIMIT_CORE, &rl) == -1) { - PLOG_W("Couldn't enforce the RLIMIT_CORE resource limit, ignoring"); - } + const struct rlimit rl = { + .rlim_cur = run->global->exe.coreLimit * 1024ULL * 1024ULL, + .rlim_max = run->global->exe.coreLimit * 1024ULL * 1024ULL, + }; + if (setrlimit(RLIMIT_CORE, &rl) == -1) { + PLOG_W("Couldn't enforce the RLIMIT_CORE resource limit, ignoring"); } #endif /* ifdef RLIMIT_CORE */ |