From 5c71a7481d2c58c8e2f4276edd6004bcf81427d3 Mon Sep 17 00:00:00 2001 From: amzn-phist <52085794+amzn-phist@users.noreply.github.com> Date: Mon, 22 Nov 2021 10:53:59 -0600 Subject: [PATCH] Modify resource limit function to warn (#5807) The function that modifies resource limits will return true always and warn instead of giving an error. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> --- .../Platform/Common/UnixLike/Launcher_UnixLike.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Code/LauncherUnified/Platform/Common/UnixLike/Launcher_UnixLike.cpp b/Code/LauncherUnified/Platform/Common/UnixLike/Launcher_UnixLike.cpp index b873f30c6d..4e121f149c 100644 --- a/Code/LauncherUnified/Platform/Common/UnixLike/Launcher_UnixLike.cpp +++ b/Code/LauncherUnified/Platform/Common/UnixLike/Launcher_UnixLike.cpp @@ -49,18 +49,17 @@ namespace rlimit limit; if (getrlimit(resource, &limit) != 0) { - AZ_Error("Launcher", false, "[ERROR] Failed to get limit for resource %d. Error: %s", resource, strerror(errno)); - return false; + AZ_Warning("Launcher", false, "[WARNING] Unable to get limit for resource %d. Error: %s", resource, strerror(errno)); } if (updateLimit(limit)) { if (setrlimit(resource, &limit) != 0) { - AZ_Error("Launcher", false, "[ERROR] Failed to update resource limit for resource %d. Error: %s", resource, strerror(errno)); - return false; + AZ_Warning("Launcher", false, "[WARNING] Unable to update resource limit for resource %d. Error: %s", resource, strerror(errno)); } } + return true; } }