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>
This commit is contained in:
amzn-phist
2021-11-22 10:53:59 -06:00
committed by GitHub
parent 85681703dc
commit 5c71a7481d
@@ -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;
}
}