Cygwin: Pass file paths instead of file descriptors over UNIX sockets
authorChristian Babeux <christian.babeux@efficios.com>
Wed, 28 Nov 2012 21:28:22 +0000 (16:28 -0500)
committerChristian Babeux <christian.babeux@efficios.com>
Wed, 28 Nov 2012 21:35:20 +0000 (16:35 -0500)
commitbf5ff35ed0a3a7f60e92d654a5b97e73b94da852
tree4aabc7a3ea035adc24dd8228805df6ed48ecbd45
parentcbd7f39d9267e24159023db91712ca91558c5cc8
Cygwin: Pass file paths instead of file descriptors over UNIX sockets

Cygwin doesn't support file descriptors passing over UNIX sockets [1].
LTTng-ust and LTTng-tools make extensive use of this feature to pass
the shm and the wakeup pipe file descriptor from the userspace tracer
to the session daemon. The sessiond then pass those file descriptors
to the consumer.

To workaround this limitation, we pass the file paths of the shm and the
named wakeup pipe. These paths are relayed by the sessiond to the
consumer. The consumer then needs to open these paths.

The files are created in /tmp/lttng-fds and have the following format:

SHM         : ust-shm-<pid>-<uuid>
Wakeup pipe : ust-wait-<pid>-<uuid>

The libringbuffer has been modified to automatically create these files
on shm creation. Take note that the shm path is actually a symlink
to the shm in /dev/shm. Also, this change introduce an additional dependency
to libuuid in libringbuffer.

[1] - http://cygwin.com/ml/cygwin/2009-10/msg00403.html
18 files changed:
include/lttng/ust-abi.h
include/lttng/ust-events.h
include/ust-comm.h
liblttng-ust-comm/lttng-ust-comm.c
liblttng-ust-ctl/ustctl.c
liblttng-ust/ltt-events.c
liblttng-ust/ltt-ring-buffer-client.h
liblttng-ust/ltt-ring-buffer-metadata-client.h
liblttng-ust/lttng-ust-abi.c
liblttng-ust/lttng-ust-comm.c
libringbuffer/Makefile.am
libringbuffer/frontend.h
libringbuffer/ring_buffer_frontend.c
libringbuffer/shm.c
libringbuffer/shm.h
libringbuffer/shm_types.h
tests/ust-basic-tracing/ust-basic-tracing.c
tests/ust-multi-test/ust-multi-test.c
This page took 0.02654 seconds and 4 git commands to generate.