Fixed thread safety procedure by adding SOCK_CLOEXEC flag
JIRA ticket IOT-440 suggested to use SOCK_CLOEXEC flag for
socket file descriptor for thread safety.
This fix will ensure SOCK_CLOEXEC flag is checked
if kernal has supports for it.
Signed-off-by: Ashok Channa <ashok.channa@samsung.com>
Change-Id: I84efdcd721c1f34f8d0931e08acbdcb147b9a5db
Reviewed-on: https://gerrit.iotivity.org/gerrit/774
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>