]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
oomd: actually fail if configuration is bad
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 26 Apr 2022 06:54:39 +0000 (08:54 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 26 Apr 2022 06:54:39 +0000 (08:54 +0200)
Follow-up for a858355e4a7168625ec1b9e5d17fdb6a11dfecb8.

src/oom/oomd.c

index 603baada5ae8887aff9acd51e68fcad7ced78c95..28de6c5502d26ead6e4315e7419c1ed1ed7c0227 100644 (file)
@@ -170,7 +170,7 @@ static int run(int argc, char *argv[]) {
         assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
 
         if (arg_mem_pressure_usec > 0 && arg_mem_pressure_usec < 1 * USEC_PER_SEC)
-                log_error_errno(SYNTHETIC_ERRNO(EINVAL), "DefaultMemoryPressureDurationSec= must be 0 or at least 1s");
+                return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "DefaultMemoryPressureDurationSec= must be 0 or at least 1s");
 
         r = manager_new(&m);
         if (r < 0)