bus: touch() the AF_UNIX sockets we listen() on after the fact
authorLennart Poettering <lennart@poettering.net>
Wed, 27 Dec 2017 17:22:31 +0000 (18:22 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 5 Jan 2018 12:55:08 +0000 (13:55 +0100)
commit5b5e6deabb8b76bcd691c4e40429bd8478a49a32
tree503fc8f657a968b9d68fdaad90229e35c96b4f1f
parent8b7f989a5824869a5ca9983b225758a8c2fd8f4a
bus: touch() the AF_UNIX sockets we listen() on after the fact

We'd like to use inotify to get notified when AF_UNIX sockets become
connectable. That happens at the moment of listen(), but this is doesn't
necessarily create in a watchable inotify event. Hence, let's synthesize
one whenever we generically create a socket, or when we know we created
it for a D-Bus server.

Ideally we wouldn't have to do this, and the kernel would generate an
event anyway for this. Doing this explicitly isn't too bad however, as
the event is still nicely associated with the AF_UNIX socket node, and
we generate all D-Bus sockets in our code hence it's safe.
src/basic/socket-label.c
src/core/dbus.c