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 BDBBA198005 for ; Wed, 27 Feb 2013 09:26:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9ECDBE07E2; Wed, 27 Feb 2013 09:25:59 +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 1E522E07E2 for ; Wed, 27 Feb 2013 09:25:59 +0000 (UTC) Received: from [192.168.1.210] (unknown [24.86.176.233]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id C25BF33DEFC for ; Wed, 27 Feb 2013 09:25:57 +0000 (UTC) Message-ID: <1361957136.20292.15.camel@big_daddy.dol-sen.ca> Subject: [gentoo-catalyst] [patch] Fix undefined variable: RLIMIT_NOFILE From: Brian Dolbec To: gentoo-catalyst@lists.gentoo.org Date: Wed, 27 Feb 2013 01:25:36 -0800 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.3 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Archives-Salt: ea7f9cce-8117-4443-a8eb-2920f4146108 X-Archives-Hash: 05f0458e3142743b6577a027ab4ed0c4 will need to be applied to master manually. ================================================ diff --git a/catalyst/support.py b/catalyst/support.py index 2133799..072b985 100644 @@ -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 = [] -- Brian Dolbec