public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-catalyst] [patch] Fix undefined variable: RLIMIT_NOFILE
@ 2013-02-27  9:25 Brian Dolbec
  0 siblings, 0 replies; only message in thread
From: Brian Dolbec @ 2013-02-27  9:25 UTC (permalink / raw
  To: gentoo-catalyst

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 <dolsen@gentoo.org>



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-02-27  9:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-27  9:25 [gentoo-catalyst] [patch] Fix undefined variable: RLIMIT_NOFILE Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox