chiark / gitweb /
systemctl: show connection counters only for Accept=yes sockets
[elogind.git] / src / manager.c
index adff54639731d2e3fd7fb0850a1e8324450c47e9..638ef2f4500af4997ea01f946ee2a039706c5a95 100644 (file)
@@ -83,7 +83,7 @@ static int manager_setup_notify(Manager *m) {
         zero(sa);
         sa.sa.sa_family = AF_UNIX;
 
-        if (m->running_as == MANAGER_SESSION)
+        if (getpid() != 1)
                 snprintf(sa.un.sun_path+1, sizeof(sa.un.sun_path)-1, NOTIFY_SOCKET "/%llu", random_ull());
         else
                 strncpy(sa.un.sun_path+1, NOTIFY_SOCKET, sizeof(sa.un.sun_path)-1);