Mercurial > pidgin.yaz
changeset 10170:3c88c2f1b732
[gaim-migrate @ 11262]
This patch changes proxy.c to set the FD_CLOEXEC flag on any sockets
it opens. This should (hopefully) fix problems with daemons propping
open oscar (and maybe other) accounts when the socket doesn't close
because a child owns it. Only time will tell...
(This just hit oldstatus as well)
committer: Tailor Script <tailor@pidgin.im>
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Thu, 11 Nov 2004 18:00:32 +0000 |
parents | a0529cf29ad4 |
children | 829a569993e0 |
files | src/proxy.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/proxy.c Thu Nov 11 02:26:44 2004 +0000 +++ b/src/proxy.c Thu Nov 11 18:00:32 2004 +0000 @@ -765,6 +765,7 @@ return -1; } fcntl(fd, F_SETFL, O_NONBLOCK); + fcntl(fd, F_SETFD, FD_CLOEXEC); if (connect(fd, (struct sockaddr *)addr, addrlen) < 0) { if ((errno == EINPROGRESS) || (errno == EINTR)) { @@ -957,6 +958,7 @@ } fcntl(fd, F_SETFL, O_NONBLOCK); + fcntl(fd, F_SETFD, FD_CLOEXEC); if (connect(fd, addr, addrlen) < 0) { if ((errno == EINPROGRESS) || (errno == EINTR)) { @@ -1088,6 +1090,7 @@ return -1; fcntl(fd, F_SETFL, O_NONBLOCK); + fcntl(fd, F_SETFD, FD_CLOEXEC); if (connect(fd, addr, addrlen) < 0) { if ((errno == EINPROGRESS) || (errno == EINTR)) { @@ -1341,6 +1344,7 @@ return -1; fcntl(fd, F_SETFL, O_NONBLOCK); + fcntl(fd, F_SETFD, FD_CLOEXEC); if (connect(fd, addr, addrlen) < 0) { if ((errno == EINPROGRESS) || (errno == EINTR)) {