diff options
Diffstat (limited to 'src/input/input_net.c')
-rw-r--r-- | src/input/input_net.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/input/input_net.c b/src/input/input_net.c index 5007b58a3..cd4a8c901 100644 --- a/src/input/input_net.c +++ b/src/input/input_net.c @@ -115,7 +115,7 @@ static int host_connect_attempt_ipv4(struct in_addr ia, int port, xine_t *xine) int s; struct sockaddr_in sin; - s = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); + s = xine_socket_cloexec(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (s==-1) { xine_log(xine, XINE_LOG_MSG, _("input_net: socket(): %s\n"), strerror(errno)); @@ -143,10 +143,9 @@ static int host_connect_attempt_ipv4(struct in_addr ia, int port, xine_t *xine) #else static int host_connect_attempt(int family, struct sockaddr* sin, int addrlen, xine_t *xine) { - int s; + int s = xine_socket_cloexec(family, SOCK_STREAM, IPPROTO_TCP); - s = socket(family, SOCK_STREAM, IPPROTO_TCP); - if (s==-1) { + if (s == -1) { xine_log(xine, XINE_LOG_MSG, _("input_net: socket(): %s\n"), strerror(errno)); return -1; |