payload: use fd_handle instead of raw file descriptors
Using raw file descriptors with lttng_payloads introduces scary file
descriptor corner-cases when mixing with asynchroneous communication and
lttng_payloads.
Since an lttng_payload doesn't own its file descriptors, attempting it
is easy to fall into a situation where a file descriptor is referenced
by an lttng_payload while the owner is destroyed.
For instance, a userspace probe could be destroyed while its description
is waiting to be sent to a client.
The various use sites of the payload/payload_view APIs are adjusted.
Utilities to send/recv fds through unix sockets using the payload and
payload view interfaces are added as part of this commit as they use
the payload's fd_handles.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I44073f1b683af6c475e8e93c25a76910acf955e4
13 files changed:
This page took 0.027163 seconds and 4 git commands to generate.