From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id DED32138299 for ; Fri, 4 Jan 2013 03:39:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9C3DAE05E8; Fri, 4 Jan 2013 03:39:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1C511E05E8 for ; Fri, 4 Jan 2013 03:39:34 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2382833C878 for ; Fri, 4 Jan 2013 03:39:33 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id ADE13E5439 for ; Fri, 4 Jan 2013 03:39:31 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1357270759.65a5f14f8b76a250f5df42e57512bfc140543622.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/_eventloop/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/util/_eventloop/EventLoop.py X-VCS-Directories: pym/portage/util/_eventloop/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 65a5f14f8b76a250f5df42e57512bfc140543622 X-VCS-Branch: master Date: Fri, 4 Jan 2013 03:39:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a38c29a7-1767-4019-ae1d-8efe2b2ccdd9 X-Archives-Hash: 9cfb311b2185ef26bcea17b94e8c299b commit: 65a5f14f8b76a250f5df42e57512bfc140543622 Author: Zac Medico gentoo org> AuthorDate: Fri Jan 4 03:39:19 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Jan 4 03:39:19 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=65a5f14f EventLoop: enable FD_CLOEXEC on epoll fd --- pym/portage/util/_eventloop/EventLoop.py | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/pym/portage/util/_eventloop/EventLoop.py b/pym/portage/util/_eventloop/EventLoop.py index d2d4963..6c2341b 100644 --- a/pym/portage/util/_eventloop/EventLoop.py +++ b/pym/portage/util/_eventloop/EventLoop.py @@ -84,6 +84,17 @@ class EventLoop(object): # IOError: [Errno 38] Function not implemented pass else: + + if fcntl is not None: + try: + fcntl.FD_CLOEXEC + except AttributeError: + pass + else: + fcntl.fcntl(epoll_obj.fileno(), fcntl.F_SETFL, + fcntl.fcntl(epoll_obj.fileno(), + fcntl.F_GETFL) | fcntl.FD_CLOEXEC) + self._poll_obj = _epoll_adapter(epoll_obj) self.IO_ERR = select.EPOLLERR self.IO_HUP = select.EPOLLHUP