]> err.no Git - systemd/commitdiff
exec: support unlimited resources
authorLennart Poettering <lennart@poettering.net>
Mon, 4 Apr 2011 16:15:13 +0000 (18:15 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 4 Apr 2011 16:15:13 +0000 (18:15 +0200)
TODO
man/systemd.exec.xml
src/load-fragment.c

diff --git a/TODO b/TODO
index 466dadc09263fd0845c9d470a338c8a408347559..494f991aaf8da27186302ca940c0262d46a5e0fe 100644 (file)
--- a/TODO
+++ b/TODO
@@ -25,6 +25,8 @@ F15:
 
 Features:
 
+* allow port = 0 in .socket units
+
 * rename systemd-logger to systemd-stdio-syslog-bridge
 
 * introduce /usr/lib/binfmt.d/, /usr/lib/tmpfiles.d/
index fb8496f54ac825e4e7f42438fed4417c6108cf6d..5b0d2ce37b74de68d5d355912b904c9913a32833 100644 (file)
                                 various resource limits for executed
                                 processes. See
                                 <citerefentry><refentrytitle>setrlimit</refentrytitle><manvolnum>2</manvolnum></citerefentry>
-                                for details.</para></listitem>
+                                for details. Use the string
+                                <varname>infinity</varname> to
+                                configure no limit on a specific
+                                resource.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
index eea545c8d983a02e7a41bfaa1380d1513c0fd6e9..8635bdb226b6eee2397ee290120fa122e1db703e 100644 (file)
@@ -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;
         }