2 * Copyright (C) 2017 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License, version 2 only, as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 51
15 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 #include <common/compat/getenv.h>
19 #include <common/consumer/consumer.h>
20 #include <common/error.h>
23 #include <lttng/constant.h>
29 #include <bin/lttng-relayd/connection.h>
31 int lttng_opt_verbose
;
35 int __testpoint_relayd_viewer_session_attach(void)
38 const char *state_file_path
;
41 state_file_path
= lttng_secure_getenv(
43 if (!state_file_path
) {
44 ERR("RELAYD_STATE_PATH getenv");
49 state_fd
= open(state_file_path
, O_WRONLY
| O_APPEND
| O_SYNC
);
51 ERR("RELAYD_STATE_PATH open");
56 dprintf(state_fd
, "Viewer attached\n");
59 (void) close(state_fd
);
This page took 0.030657 seconds and 5 git commands to generate.