]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
rlimit-util: log when falling back setting limit
authorPierre Dubouilh <pldubouilh@gmail.com>
Sun, 14 Feb 2021 23:16:30 +0000 (00:16 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 15 Feb 2021 14:30:35 +0000 (15:30 +0100)
src/basic/rlimit-util.c

index e01ffdb0744fc01338fd1d980e8ee475679f1075..23d108d5df397affe43ad0246258289cc2f654df 100644 (file)
@@ -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;