Cygwin: Introduce new LTTNG_UST_STREAM_PIPE command to open wakeup pipe
Normally, the userspace tracer open the wakeup pipe, and the resulting
fd is passed to the consumer via the session daemon. Since we can't pass
fds via UNIX socket, the pipe need to be opened separately in the tracer
and in the consumer. The only way to open the write side of a named pipe
*before* the read side without blocking is to open it in read/write mode.
This is supported on Linux, but POSIX leave this behavior undefined [1].
The Cygwin named pipe implementation doesn't seem to allow multiple
readers/writers on a named pipe. Opening a pipe in RW mode in the tracer
and then opening the read side in the consumer won't work because the
consumer will get a "Device or ressource busy" error. Thus arise the need
to open the named pipe read side *before* the write side.
In order to accomplish this task, a new command must be introduced to signal
to the tracer that a specific named pipe should be opened in write mode.
Proper care must be taken to issue this command *after* the named pipe paths
have been sent to the consumer or else the sessiond or tracer will block
indefinitely.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
This page took 0.026879 seconds and 4 git commands to generate.