]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
load-fragment: setting empty string to Nice= resets the previous assignments
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 25 May 2018 01:52:47 +0000 (10:52 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 31 May 2018 02:09:41 +0000 (11:09 +0900)
src/core/load-fragment.c

index 0bc162ad1de0c1a97eea3c9af25a82b5d157589c..d2ce73f726e281e1fddab901bf996178563e1fe1 100644 (file)
@@ -490,6 +490,11 @@ int config_parse_exec_nice(
         assert(rvalue);
         assert(data);
 
+        if (isempty(rvalue)) {
+                c->nice_set = false;
+                return 0;
+        }
+
         r = parse_nice(rvalue, &priority);
         if (r < 0) {
                 if (r == -ERANGE)