- /* Unlike in systemd where this has to use a private socket,
- since logind doesn't associate control groups with services
- and doesn't manage the dbus service, we can just use the
- system bus. */
- r = sd_bus_open_system(&bus);
- if (r < 0) {
- log_debug_errno(r, "Failed to open system bus: %m");
+ fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0);
+ if (fd < 0) {
+ log_debug_errno(errno, "Failed to allocate socket: %m");
+ return EXIT_FAILURE;
+ }
+
+ l = strlen(argv[1]);
+
+ n = sendto(fd, argv[1], l, 0, &sa.sa, SOCKADDR_UN_LEN(sa.un));
+ if (n < 0) {
+ log_debug_errno(errno, "Failed to send cgroups agent message: %m");