Re: Using D-Bus for private IPC
Lawrence D'Oliveiro <ldo-kC51rjc0cqs1dNLGKZg6taU/[email protected]> Tue, 27 Sep 2022 10:23:08 +1300
| Newsgroups | gmane.comp.freedesktop.dbus |
|---|---|
| Organization | Geek Central |
| Message-ID | <[email protected]> |
On Mon, 26 Sep 2022 14:34:00 -0400, Link Dupont wrote: > It's a one-to-many model, so I'm not sure peer-to-peer would work. > One process is the server, and there are many processes that are > clients. So you do the conventional thing, and have the server listen on a socket for incoming connections. It can accept as many client connections as it can handle. Also if you use AF_UNIX sockets, you can query the credentials of the process at the other end, and do authentication that way. And on Mon, 26 Sep 2022 11:39:12 -0400, Link Dupont wrote: > Is there a better way to create a private bus session from within a > systemd unit, or is 'ExecStart=dbus-run-session /usr/bin/myprog' the > recommended way to start up a private bus? systemd also allows you to tell it you have a socket, and it will automatically launch your listener on demand <https://www.freedesktop.org/software/systemd/man/systemd.socket.html>.