chiark / gitweb /
unit,job: when we suppress a D-Bus signal because nobody is listening, don't delay...
[elogind.git] / manager.c
index 46b187658d3534cc52892391e097b2ad6a485f40..767533484ea09bf4685ef33895368e14ef99d187 100644 (file)
--- a/manager.c
+++ b/manager.c
@@ -57,7 +57,7 @@
 #define GC_QUEUE_ENTRIES_MAX 16
 
 /* As soon as 5s passed since a unit was added to our GC queue, make sure to run a gc sweep */
-#define GC_QUEUE_USEC_MAX (5*USEC_PER_SEC)
+#define GC_QUEUE_USEC_MAX (10*USEC_PER_SEC)
 
 static int enable_special_signals(Manager *m) {
         char fd;
@@ -68,7 +68,7 @@ static int enable_special_signals(Manager *m) {
         if (reboot(RB_DISABLE_CAD) < 0)
                 log_warning("Failed to enable ctrl-alt-del handling: %m");
 
-        if ((fd = open_terminal("/dev/tty0", O_RDWR)) < 0)
+        if ((fd = open_terminal("/dev/tty0", O_RDWR|O_NOCTTY)) < 0)
                 log_warning("Failed to open /dev/tty0: %m");
         else {
                 /* Enable that we get SIGWINCH on kbrequest */
@@ -149,12 +149,12 @@ static char** session_dirs(void) {
         }
 
         if ((e = getenv("XDG_CONFIG_DIRS")))
-                config_dirs = strv_split(e, ":");
-        else
-                config_dirs = strv_new("/etc/xdg", NULL);
+                if (!(config_dirs = strv_split(e, ":")))
+                        goto fail;
 
-        if (!config_dirs)
-                goto fail;
+        /* We don't treat /etc/xdg/systemd here as the spec
+         * suggests because we assume that that is a link to
+         * /etc/systemd/ anyway. */
 
         if ((e = getenv("XDG_DATA_HOME"))) {
                 if (asprintf(&data_home, "%s/systemd/session", e) < 0)