diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-04-11 16:11:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-04-11 16:11:51 +0200 |
commit | 50579107e3f628c2e3c644d5af01ef67404a0f2a (patch) | |
tree | df1c72b7bd6478a0676c573db9ef619e8610be4c /bbot/agent.cxx | |
parent | f38fa3d9a5ee0ab92ac6c8b07b935724bbbcef1e (diff) |
Close sockets on exec
Diffstat (limited to 'bbot/agent.cxx')
-rw-r--r-- | bbot/agent.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bbot/agent.cxx b/bbot/agent.cxx index 8a47483..4d5cc4a 100644 --- a/bbot/agent.cxx +++ b/bbot/agent.cxx @@ -55,7 +55,7 @@ namespace bbot if (i.size () >= IFNAMSIZ) throw invalid_argument ("interface nama too long"); - auto_fd fd (socket (AF_INET, SOCK_DGRAM, 0)); + auto_fd fd (socket (AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); if (fd.get () == -1) throw_system_error (errno); |