chiark / gitweb /
bus: properly unmap mapped area
[elogind.git] / src / login / logind.c
index 3b9da1985885990f78ab3360724990fa0c374992..5a394401dc414e5b09806982b80ca827ad814739 100644 (file)
@@ -1626,7 +1626,7 @@ int manager_run(Manager *m) {
 
                 manager_gc(m, true);
 
-                if (m->action_what != 0) {
+                if (m->action_what != 0 && !m->action_job) {
                         usec_t x, y;
 
                         x = now(CLOCK_MONOTONIC);
@@ -1683,13 +1683,12 @@ int manager_run(Manager *m) {
 }
 
 static int manager_parse_config_file(Manager *m) {
-        FILE *f;
-        const char *fn;
+        static const char fn[] = "/etc/systemd/logind.conf";
+        _cleanup_fclose_ FILE *f = NULL;
         int r;
 
         assert(m);
 
-        fn = "/etc/systemd/logind.conf";
         f = fopen(fn, "re");
         if (!f) {
                 if (errno == ENOENT)
@@ -1699,12 +1698,11 @@ static int manager_parse_config_file(Manager *m) {
                 return -errno;
         }
 
-        r = config_parse(NULL, fn, f, "Login\0", config_item_perf_lookup, (void*) logind_gperf_lookup, false, m);
+        r = config_parse(NULL, fn, f, "Login\0", config_item_perf_lookup,
+                         (void*) logind_gperf_lookup, false, false, m);
         if (r < 0)
                 log_warning("Failed to parse configuration file: %s", strerror(-r));
 
-        fclose(f);
-
         return r;
 }