# HG changeset patch # User Ethan Blanton # Date 1100196032 0 # Node ID 3c88c2f1b732bb172c4b61a0fb2b24b01e787c39 # Parent a0529cf29ad46cfca5208313538309a128fbf488 [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 diff -r a0529cf29ad4 -r 3c88c2f1b732 src/proxy.c --- 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)) {