pipe.cpp
has:
void Pipe::signal() { // TODO: ignoring return of read/write generates warning; maybe relevant for eventloop work... ::write(_fd_write, '\0', 1); }
What is this supposed to do?! The write
function takes a pointer as its second argument, not a character. In older versions of C++ the \0
would be interpreted as a null pointer constant, so it's the same as calling ::write(_fd_write, NULL, 1)
which is undefined behaviour (and probably returns an error and sets errno
to EFAULT
).
I assume you meant to write a single character, e.g. ::write(_fd_write, "", 1);
@Jonathan Wakely, sorry for unrelated comment, we have also experienced a number of design and run-time stability issues with dbus-c++. So we built our own C++ implementation, called sdbus-c++, based on systemd's D-Bus implementation, using a few C++17 features, which we have released open source on github. It doesn't cover all D-Bus functionality (yet), but the core is there... In case it would help you...