ust consumer: flag shm/wait fd as copy
[lttng-tools.git] / liblttng-ustconsumer / lttng-ustconsumer.c
index bf3ae08452f9371afc08393b6ba56c4f71e1c541..db0ba05bd6a160c691b77eff6fe8808a2032dd45 100644 (file)
@@ -272,11 +272,11 @@ int lttng_ustconsumer_allocate_channel(struct lttng_consumer_channel *chan)
                return -ENOMEM;
        }
        /*
-        * The channel shm and wait fds are passed to ustctl, set them
-        * to -1 here.
+        * The channel fds are passed to ustctl, we only keep a copy.
         */
-       chan->shm_fd = -1;
-       chan->wait_fd = -1;
+       chan->shm_fd_is_copy = 1;
+       chan->wait_fd_is_copy = 1;
+
        return 0;
 }
 
@@ -305,11 +305,10 @@ int lttng_ustconsumer_allocate_stream(struct lttng_consumer_stream *stream)
                return -EINVAL;
        }
        /*
-        * The stream shm and wait fds are passed to ustctl, set them to
-        * -1 here.
+        * The stream fds are passed to ustctl, we only keep a copy.
         */
-       stream->shm_fd = -1;
-       stream->wait_fd = -1;
+       stream->shm_fd_is_copy = 1;
+       stream->wait_fd_is_copy = 1;
 
        return 0;
 }
This page took 0.023243 seconds and 4 git commands to generate.