summaryrefslogtreecommitdiff
path: root/src/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-04-04 18:15:13 +0200
committerLennart Poettering <lennart@poettering.net>2011-04-04 18:15:13 +0200
commit3d57c6ab801f4437f12948e29589e3d00c3ad9db (patch)
tree95e8c1d399c1e40d3859ef9fb7e2ebc77a7f7052 /src/load-fragment.c
parent3bbecb2f2cd758e2513993efad01180c7c3c665f (diff)
exec: support unlimited resources
Diffstat (limited to 'src/load-fragment.c')
-rw-r--r--src/load-fragment.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/load-fragment.c b/src/load-fragment.c
index eea545c8d9..8635bdb226 100644
--- a/src/load-fragment.c
+++ b/src/load-fragment.c
@@ -30,6 +30,8 @@
#include <sys/mount.h>
#include <linux/fs.h>
#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/resource.h>
#include "unit.h"
#include "strv.h"
@@ -965,7 +967,9 @@ static int config_parse_limit(
assert(rvalue);
assert(data);
- if (safe_atollu(rvalue, &u) < 0) {
+ if (streq(rvalue, "infinity"))
+ u = (unsigned long long) RLIM_INFINITY;
+ else if (safe_atollu(rvalue, &u) < 0) {
log_error("[%s:%u] Failed to parse resource value, ignoring: %s", filename, line, rvalue);
return 0;
}