Set CLOEXEC for connected fd
authorHaijun Zhu <haijunz@fb.com>
Mon, 2 Feb 2015 19:41:38 +0000 (11:41 -0800)
committerAndrew Cox <andrewcox@fb.com>
Wed, 4 Feb 2015 20:58:38 +0000 (12:58 -0800)
commit4bffc7589f7bb66aa8ab0dbf1e5d39840daf6121
tree6a36dfd08266f25264cb0e878500754b620dbdf6
parent1219e49411f20b15f0d577375891d5d20a20e254
Set CLOEXEC for connected fd

Summary:
AsyncSocket sets CLOEXEC if it connects an address, but won't
if it uses a connected fd. This sets CLOEXEC for such fd.

Test Plan: fbconfig folly/io/async/test && fbmake runtests

Reviewed By: davejwatson@fb.com

Subscribers: trunkagent, folly-diffs@, zacm

FB internal diff: D1809300

Signature: t1:1809300:1422900997:40fcc84506582ac67076fd975a36d094522c35c2
folly/io/async/AsyncSocket.cpp
folly/io/async/AsyncSocket.h