summaryrefslogtreecommitdiffstats
path: root/src/daemon/pipename.c
blob: 70b6a25b4280cf5cd65fb1f641e7ec197fe45442 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-License-Identifier: GPL-3.0-or-later

#include "pipename.h"

#include <stdlib.h>

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
}