public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:2.X commit in: modules/
Date: Mon, 24 Mar 2014 16:08:02 +0000 (UTC)	[thread overview]
Message-ID: <1395677228.12c985f89515f17d59107c35d8e9c76f3735f80a.dol-sen@gentoo> (raw)

commit:     12c985f89515f17d59107c35d8e9c76f3735f80a
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 14 03:32:29 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon Mar 24 16:07:08 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=12c985f8

Fix undefined variable: RLIMIT_NOFILE

It was not imported from resource, it was also not used correctly.

---
 modules/catalyst_support.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py
index 316dfa3..d493f88 100644
--- a/modules/catalyst_support.py
+++ b/modules/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 = []


             reply	other threads:[~2014-03-24 16:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24 16:08 Brian Dolbec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-01-19  3:19 [gentoo-commits] proj/catalyst:2.X commit in: modules/ Anthony G. Basile
2014-12-19  1:23 Jorge Manuel B. S. Vicetto
2014-12-06 17:37 Jorge Manuel B. S. Vicetto
2014-12-06 16:56 Jorge Manuel B. S. Vicetto
2014-05-16 19:15 Brian Dolbec
2014-04-05  7:36 Brian Dolbec
2014-03-24 16:08 Brian Dolbec
2014-01-01 22:03 Brian Dolbec
2014-01-01 21:40 Brian Dolbec
2014-01-01 14:47 Brian Dolbec
2013-12-31 23:27 Brian Dolbec
2013-12-31 20:15 Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395677228.12c985f89515f17d59107c35d8e9c76f3735f80a.dol-sen@gentoo \
    --to=brian.dolbec@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox