{ "help", 0, 0, 'h', },
{ "output", 1, 0, 'o', },
{ "verbose", 0, 0, 'v', },
+ { "background", 0, 0, 'b' },
{ NULL, 0, 0, 0, },
};
while (1) {
int option_index = 0;
- c = getopt_long(argc, argv, "dhv" "C:D:L:o:g:",
+ c = getopt_long(argc, argv, "dhv" "C:D:L:o:g:b",
long_options, &option_index);
if (c == -1) {
break;
case 'd':
opt_daemon = 1;
break;
+ case 'b':
+ opt_background = 1;
+ break;
case 'g':
tracing_group_name = optarg;
break;
reply.session_id = htobe64(session->id);
switch (cmd->minor) {
+ case 1:
+ case 2:
+ case 3:
+ break;
case 4: /* LTTng sessiond 2.4 */
default:
ret = cmd_create_session_2_4(cmd, session);
* stream message is received, this list is emptied and streams are set
* with the viewer ready flag.
*/
- if (stream->metadata_flag) {
- stream->viewer_ready = 1;
- } else {
- queue_stream_handle(stream->stream_handle, cmd);
- }
+ queue_stream_handle(stream->stream_handle, cmd);
lttng_ht_node_init_ulong(&stream->stream_n,
(unsigned long) stream->stream_handle);
*/
set_viewer_ready_flag(cmd);
+ /*
+ * Inform the viewer that there are new streams in the session.
+ */
+ uatomic_set(&cmd->session->new_streams, 1);
+
reply.ret_code = htobe32(LTTNG_OK);
send_ret = cmd->sock->ops->sendmsg(cmd->sock, &reply, sizeof(reply), 0);
if (send_ret < 0) {