diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-10-23 14:16:27 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-10-25 13:35:32 +0200 |
commit | c3588737d1fc93609d4101fa49aed3217503eef7 (patch) | |
tree | aeeb96c7097757a4b444f75b2ca8122b80fdb394 /gweb/gweb.c | |
parent | d997ab9aa2dab15d486b3836e5dc04ae23fefdc0 (diff) | |
download | connman-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.c | 3 |
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; |