aboutsummaryrefslogtreecommitdiff
path: root/zencore/filesystem.cpp
diff options
context:
space:
mode:
authorJoe Kirchoff <[email protected]>2022-04-14 11:30:17 -0700
committerJoe Kirchoff <[email protected]>2022-04-14 11:30:17 -0700
commit3b2ba4d51ecac822ad8d608f84cc4de62a30d4b3 (patch)
treecee01ac5639258fe4020bc55030946e0f9e5f62e /zencore/filesystem.cpp
parentMerge pull request #70 from EpicGames/on-prem-runner-testing (diff)
downloadzen-3b2ba4d51ecac822ad8d608f84cc4de62a30d4b3.tar.xz
zen-3b2ba4d51ecac822ad8d608f84cc4de62a30d4b3.zip
clang format
Diffstat (limited to 'zencore/filesystem.cpp')
-rw-r--r--zencore/filesystem.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/zencore/filesystem.cpp b/zencore/filesystem.cpp
index 7ff0dc45c..437741161 100644
--- a/zencore/filesystem.cpp
+++ b/zencore/filesystem.cpp
@@ -993,7 +993,7 @@ MaximizeOpenFileCount()
{
#if ZEN_PLATFORM_LINUX || ZEN_PLATFORM_MAC
struct rlimit Limit;
- int Error = getrlimit(RLIMIT_NOFILE, &Limit);
+ int Error = getrlimit(RLIMIT_NOFILE, &Limit);
if (Error)
{
ZEN_WARN("failed getting rlimit RLIMIT_NOFILE, reason '{}'", zen::MakeErrorCode(Error).message());
@@ -1001,13 +1001,22 @@ MaximizeOpenFileCount()
else
{
struct rlimit NewLimit = Limit;
- NewLimit.rlim_cur = NewLimit.rlim_max;
- ZEN_INFO("changing RLIMIT_NOFILE from rlim_cur = {}, rlim_max {} to rlim_cur = {}, rlim_max {}", Limit.rlim_cur, Limit.rlim_max, NewLimit.rlim_cur, NewLimit.rlim_max);
+ NewLimit.rlim_cur = NewLimit.rlim_max;
+ ZEN_INFO("changing RLIMIT_NOFILE from rlim_cur = {}, rlim_max {} to rlim_cur = {}, rlim_max {}",
+ Limit.rlim_cur,
+ Limit.rlim_max,
+ NewLimit.rlim_cur,
+ NewLimit.rlim_max);
Error = setrlimit(RLIMIT_NOFILE, &NewLimit);
if (Error != 0)
{
- ZEN_WARN("failed to set RLIMIT_NOFILE limits from rlim_cur = {}, rlim_max {} to rlim_cur = {}, rlim_max {}, reason '{}'", Limit.rlim_cur, Limit.rlim_max, NewLimit.rlim_cur, NewLimit.rlim_max, zen::MakeErrorCode(Error).message());
+ ZEN_WARN("failed to set RLIMIT_NOFILE limits from rlim_cur = {}, rlim_max {} to rlim_cur = {}, rlim_max {}, reason '{}'",
+ Limit.rlim_cur,
+ Limit.rlim_max,
+ NewLimit.rlim_cur,
+ NewLimit.rlim_max,
+ zen::MakeErrorCode(Error).message());
}
}
#endif