Setting CLOEXEC with included function