summaryrefslogtreecommitdiff
path: root/src/ntp.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-10-23 14:16:29 +0200
committerMarcel Holtmann <marcel@holtmann.org>2011-10-25 13:36:28 +0200
commit3866231ce4dd27533e086490b84b5363d788721d (patch)
treeea8ae35ba4df1ec23e408d3a9fc9e10ebc690433 /src/ntp.c
parent244b3b17aa713d6daf70709e105c0e0a1faff78e (diff)
downloadconnman-3866231ce4dd27533e086490b84b5363d788721d.tar.gz
connman-3866231ce4dd27533e086490b84b5363d788721d.tar.bz2
connman-3866231ce4dd27533e086490b84b5363d788721d.zip
core: Add SOCK_CLOEXEC to socket()
Make sure all file descriptor are closed.
Diffstat (limited to 'src/ntp.c')
-rw-r--r--src/ntp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ntp.c b/src/ntp.c
index 32ae714d..fa4f6244 100644
--- a/src/ntp.c
+++ b/src/ntp.c
@@ -266,7 +266,7 @@ static void start_ntp(const char *server)
if (channel_watch > 0)
return;
- fd = socket(PF_INET, SOCK_DGRAM, 0);
+ fd = socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
if (fd < 0) {
connman_error("Failed to open time server socket");
return;