summaryrefslogtreecommitdiff
path: root/gweb/gweb.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-10-23 14:16:27 +0200
committerMarcel Holtmann <marcel@holtmann.org>2011-10-25 13:35:32 +0200
commitc3588737d1fc93609d4101fa49aed3217503eef7 (patch)
treeaeeb96c7097757a4b444f75b2ca8122b80fdb394 /gweb/gweb.c
parentd997ab9aa2dab15d486b3836e5dc04ae23fefdc0 (diff)
downloadconnman-c3588737d1fc93609d4101fa49aed3217503eef7.tar.gz
connman-c3588737d1fc93609d4101fa49aed3217503eef7.tar.bz2
connman-c3588737d1fc93609d4101fa49aed3217503eef7.zip
gweb: Add SOCK_CLOEXEC to socket()
Make sure all file descriptor are closed.
Diffstat (limited to 'gweb/gweb.c')
-rw-r--r--gweb/gweb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gweb/gweb.c b/gweb/gweb.c
index 34288bf2..b7cfe62e 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -905,7 +905,8 @@ static int connect_session_transport(struct web_session *session)
GIOFlags flags;
int sk;
- sk = socket(session->addr->ai_family, SOCK_STREAM, IPPROTO_TCP);
+ sk = socket(session->addr->ai_family, SOCK_STREAM | SOCK_CLOEXEC,
+ IPPROTO_TCP);
if (sk < 0)
return -EIO;