Close tcp sockets upon exec

(cherry picked from commit 6c4d5a51c44a4634241f7bafcb3630bf0b751e13)
Merge pull request #121 from rhc54/cmr/leaks

Close tcp sockets upon exec