[systemd-devel] Exception safety od sd-bus

Lennart Poettering lennart at poettering.net
Tue Jul 27 15:35:13 UTC 2021


On Do, 22.07.21 14:04, Stanislav Angelovič (angelovic.s at gmail.com) wrote:

> Hi guys!
>
> Assuming sd-bus is used in a C++ application, is sd-bus safe against
> exceptions flying from e.g. a sd-bus vtable callback handler (provided by
> the C++ application) and catching them in the caller of sd_bus_process()
> (which is the same C++ app)?
>
> Or this is not supported (so leaks or whatever obscure situations may
> happen then)?

systemd does not use C++, we are a C project.

We make sure superficially our C header files are compatible with C++,
but that's how far our support for C++ goes.

I have no experience with C++ exceptions and C stack frames. We have
no explicit support for any of it, so they are handled like in any
program where C++ is called from C contexts, and I figure there will
be plenty docs about that.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list