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 D644D1381FA for ; Mon, 5 May 2014 19:17:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B8F2E0B20; Mon, 5 May 2014 19:17:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 629A1E0B18 for ; Mon, 5 May 2014 19:17:45 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 69D6D3402EC for ; Mon, 5 May 2014 19:17:44 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id C5D0A18746 for ; Mon, 5 May 2014 19:17:42 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1396469063.380085b1b64a80cd6fc8518309e8ca9e31246ba3.dol-sen@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/support.py X-VCS-Directories: catalyst/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 380085b1b64a80cd6fc8518309e8ca9e31246ba3 X-VCS-Branch: master Date: Mon, 5 May 2014 19:17:42 +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: 98e7bf0e-bd30-4976-b31d-5ca73824ba04 X-Archives-Hash: 36550f1935c76d263b34fa627cef40b2 Message-ID: <20140505191742.ZYZja0GpZb7ts6o6TnADsVWdphidFyxcAk_DfFs-7rM@z> commit: 380085b1b64a80cd6fc8518309e8ca9e31246ba3 Author: Brian Dolbec gentoo org> AuthorDate: Mon Jan 14 03:32:29 2013 +0000 Commit: Brian Dolbec gmail com> CommitDate: Wed Apr 2 20:04:23 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=380085b1 Fix undefined variable: RLIMIT_NOFILE It was not imported from resource, it was also not used correctly. --- catalyst/support.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/catalyst/support.py b/catalyst/support.py index e25394e..5abf614 100644 --- a/catalyst/support.py +++ b/catalyst/support.py @@ -6,14 +6,16 @@ selinux_capable = False #fakeroot_capable = False BASH_BINARY = "/bin/bash" +# set it to 0 for the soft limit, 1 for the hard limit +DESIRED_RLIMIT = 0 try: - import resource - max_fd_limit=resource.getrlimit(RLIMIT_NOFILE) + import resource + max_fd_limit=resource.getrlimit(resource.RLIMIT_NOFILE)[DESIRED_RLIMIT] except SystemExit, e: - raise + raise except: - # hokay, no resource module. - max_fd_limit=256 + # hokay, no resource module. + max_fd_limit=256 # pids this process knows of. spawned_pids = []