On Mo, 14.01.19 21:07, Jean Valjean (valjean.jean1802@xxxxxxxxx) wrote: > I want to send a reply to a method call outside method_handler. Is it > possible? > In the method_handler I increase reference count of sd_bus_message and send > it to the other thread. From there I want to call > sd_bus_reply_method_return to send a reply but get Unknown method or > interface error when I invoke method with bussctl --user call. If I call > the return method from method_handler everything works as expected. Note that sd-bus is not thread-safe on its own. It's threads-aware however: if you are careful to lock around all invocations of sd_bus using a single connection (and its associated messages) is generally fine, but it's up to you to carefully lock. So yeah, it's certainly OK to reply to an incoming bus call msgs outside of the stack method handler stack frame, but if that means threads, then make sure you know what you are doing. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel