diff options
author | vkalintiris <vasilis@netdata.cloud> | 2023-06-21 17:11:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 17:11:08 +0300 |
commit | 9325f2f0acda6a3c2c712e1b8c05e34ab54f05b7 (patch) | |
tree | 931abcdbbc3526102c0161cc5adca13ccd5e0d61 /cli | |
parent | 97ed758f5bf84107b62d056abdb3e5a102fbc906 (diff) |
Allow overriding pipename from env (#15215)
This in turn will allow us to target specific agent processes
running with the commands cli.
Diffstat (limited to 'cli')
-rw-r--r-- | cli/cli.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-or-later #include "cli.h" +#include "daemon/pipename.h" void error_int(int is_collector __maybe_unused, const char *prefix __maybe_unused, const char *file __maybe_unused, const char *function __maybe_unused, const unsigned long line __maybe_unused, const char *fmt, ... ) { FILE *fp = stderr; @@ -288,7 +289,9 @@ int main(int argc, char **argv) } req.data = buffer_create(128, NULL); - uv_pipe_connect(&req, &client_pipe, PIPENAME, connect_cb); + + const char *pipename = daemon_pipename(); + uv_pipe_connect(&req, &client_pipe, pipename, connect_cb); uv_run(loop, UV_RUN_DEFAULT); |