summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e6361eb)
raw | patch | inline | side by side (parent: e6361eb)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Tue, 8 Sep 2015 14:11:56 +0000 (16:11 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Mon, 14 Sep 2015 18:40:35 +0000 (20:40 +0200) |
src/daemon/collectd.c | patch | blob | history |
diff --git a/src/daemon/collectd.c b/src/daemon/collectd.c
index 58325b95be73973b5cd5c596466255d3a325f6a5..02fd66f80ee3c3c9cf563c3629b6e34147e7dd49 100644 (file)
--- a/src/daemon/collectd.c
+++ b/src/daemon/collectd.c
unsetenv ("NOTIFY_SOCKET");
+#if defined(SOCK_CLOEXEC)
+ fd = socket (AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, /* protocol = */ 0);
+#else
fd = socket (AF_UNIX, SOCK_DGRAM, /* protocol = */ 0);
+#endif
if (fd < 0) {
char errbuf[1024];
ERROR ("creating UNIX socket failed: %s",