Usually, collectd runs as user root, thus making it an unsafe operation to
unconditionally remove the file even though one should be able to assume
that it "belongs" to collectd.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
strncpy (addr.sun_path, sock_file, (size_t)(UNIX_PATH_MAX - 1));
addr.sun_path[UNIX_PATH_MAX - 1] = '\0';
- unlink (addr.sun_path);
errno = 0;
if (-1 == bind (connector_socket, (struct sockaddr *)&addr,