rlimit-util: log when falling back setting limit
This commit is contained in:
committed by
Lennart Poettering
parent
458ab40f35
commit
1edebb0b89
@@ -43,6 +43,8 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) {
|
||||
fixed.rlim_max == highest.rlim_max)
|
||||
return 0;
|
||||
|
||||
log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", rlim->rlim_max, rlimit_to_string(resource), fixed.rlim_max);
|
||||
|
||||
if (setrlimit(resource, &fixed) < 0)
|
||||
return -errno;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user