obus
obus copied to clipboard
File descriptor in a signal message containing destination is closed
If a D-Bus server sends a signal message containing destination and file descriptor, OBus closes the file descriptor in the message.
https://github.com/ocaml-community/obus/blob/master/src/protocol/oBus_connection.ml#L459
match apply_filters "incoming" message active.incoming_filters with
| None -> ...
| Some message ->
(* The internal dispatcher accepts only messages destined to
the current connection: *)
if active.name = "" || OBus_message.destination message = active.name then ignore (
(try%lwt
dispatch_message active message
with exn ->
Lwt_log.error ~section ~exn "message dispatching failed with")
[%lwt.finally
OBus_value.V.sequence_close (OBus_message.body message)]
);
If a signal message doesn't contain destination, " OBus_value.V.sequence_close" is not called. But If a signal message contains destination, " OBus_value.V.sequence_close" is called, file descriptor is closed.