aboutsummaryrefslogtreecommitdiff
path: root/bbot/machine.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-11 16:11:51 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-11 16:11:51 +0200
commit50579107e3f628c2e3c644d5af01ef67404a0f2a (patch)
treedf1c72b7bd6478a0676c573db9ef619e8610be4c /bbot/machine.cxx
parentf38fa3d9a5ee0ab92ac6c8b07b935724bbbcef1e (diff)
Close sockets on exec
Diffstat (limited to 'bbot/machine.cxx')
-rw-r--r--bbot/machine.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/bbot/machine.cxx b/bbot/machine.cxx
index 94a81ab..8cad3f9 100644
--- a/bbot/machine.cxx
+++ b/bbot/machine.cxx
@@ -257,7 +257,7 @@ namespace bbot
addr.sun_family = AF_LOCAL;
strcpy (addr.sun_path, monitor.string ().c_str ()); // Size check in ctor
- auto_fd sock (socket (AF_LOCAL, SOCK_STREAM, 0));
+ auto_fd sock (socket (AF_LOCAL, SOCK_STREAM | SOCK_CLOEXEC, 0));
if (sock.get () == -1)
throw_system_error (errno);