diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-10-23 14:16:29 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-10-25 13:36:28 +0200 |
commit | 3866231ce4dd27533e086490b84b5363d788721d (patch) | |
tree | ea8ae35ba4df1ec23e408d3a9fc9e10ebc690433 /src/ntp.c | |
parent | 244b3b17aa713d6daf70709e105c0e0a1faff78e (diff) | |
download | connman-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |