Implement the RELAYD_ROTATE_STREAM relay daemon command
[lttng-tools.git] / src / common / utils.c
index 182b6eed7c700cd53579a4bac3cf74a0b1d42f8b..f1e0148cb9cb9cd28159846141a99fc108b95a58 100644 (file)
@@ -785,7 +785,11 @@ int utils_create_stream_file(const char *path_name, char *file_name, uint64_t si
                goto error;
        }
 
-       flags = O_WRONLY | O_CREAT | O_TRUNC;
+       /*
+        * With the session rotation feature on the relay, we might need to seek
+        * and truncate a tracefile, so we need read and write access.
+        */
+       flags = O_RDWR | O_CREAT | O_TRUNC;
        /* Open with 660 mode */
        mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;
 
This page took 0.0236 seconds and 4 git commands to generate.