Cygwin: Pass file paths instead of file descriptors over UNIX sockets
authorChristian Babeux <christian.babeux@efficios.com>
Mon, 3 Dec 2012 01:37:18 +0000 (20:37 -0500)
committerChristian Babeux <christian.babeux@efficios.com>
Fri, 7 Dec 2012 20:17:55 +0000 (15:17 -0500)
commit6684bfa4a76f566ff024d4f2159f59f2e783d8c2
treed7d6c6bf0fd40f57b0f1a0667f7449ea56cf0b8e
parent387bdf2d8afb233b1a35d4b90686c49e2b269d29
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>

[1] - http://cygwin.com/ml/cygwin/2009-10/msg00403.html

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
src/bin/lttng-sessiond/lttng-ust-abi.h
src/bin/lttng-sessiond/ust-consumer.c
src/common/sessiond-comm/sessiond-comm.c
src/common/sessiond-comm/sessiond-comm.h
src/common/ust-consumer/ust-consumer.c
This page took 0.025031 seconds and 4 git commands to generate.