From 836b47cb7e99a977c5a23b059ca1d0b5065d310e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 24 Jul 2024 11:54:23 +0200 Subject: Merging upstream version 1.46.3. Signed-off-by: Daniel Baumann --- src/daemon/pipename.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/daemon/pipename.c (limited to 'src/daemon/pipename.c') diff --git a/src/daemon/pipename.c b/src/daemon/pipename.c new file mode 100644 index 000000000..70b6a25b4 --- /dev/null +++ b/src/daemon/pipename.c @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "pipename.h" + +#include + +const char *daemon_pipename(void) { + const char *pipename = getenv("NETDATA_PIPENAME"); + if (pipename) + return pipename; + +#ifdef _WIN32 + return "\\\\?\\pipe\\netdata-cli"; +#else + return "/tmp/netdata-ipc"; +#endif +} -- cgit v1.2.3