From 50579107e3f628c2e3c644d5af01ef67404a0f2a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 11 Apr 2017 16:11:51 +0200 Subject: Close sockets on exec --- bbot/machine.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bbot/machine.cxx') 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); -- cgit v1.1