[Spambayes-checkins] spambayes pop3proxy.py,1.48,1.49

Richie Hindle richiehindle at users.sourceforge.net
Fri Jan 31 10:29:51 EST 2003


Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv15900

Modified Files:
	pop3proxy.py 
Log Message:
Increase the stack size on MacOS X.


Index: pop3proxy.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/pop3proxy.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** pop3proxy.py	29 Jan 2003 03:23:34 -0000	1.48
--- pop3proxy.py	31 Jan 2003 18:29:48 -0000	1.49
***************
*** 150,153 ****
--- 150,165 ----
  from spambayes.Options import options
  
+ # Increase the stack size on MacOS X.  Stolen from Lib/test/regrtest.py
+ if sys.platform == 'darwin':
+     try:
+         import resource
+     except ImportError:
+         pass
+     else:
+         soft, hard = resource.getrlimit(resource.RLIMIT_STACK)
+         newsoft = min(hard, max(soft, 1024*2048))
+         resource.setrlimit(resource.RLIMIT_STACK, (newsoft, hard))
+ 
+ 
  # HEADER_EXAMPLE is the longest possible header - the length of this one
  # is added to the size of each message.





More information about the Spambayes-checkins mailing list