Limit luatex to 500M of virtual memory.
authorMatthijs Kooijman <matthijs@stdin.nl>
Sun, 6 Dec 2009 17:13:12 +0000 (18:13 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Sun, 6 Dec 2009 17:13:12 +0000 (18:13 +0100)
Luatex has the tendency to bring down the entire system when it goes
into some infinite loop.

SConstruct

index a05a298..05bd779 100644 (file)
@@ -19,7 +19,8 @@ if ARGUMENTS.get('once'):
 else:
        once = ''
 
-contextBuilder = Builder(action='nice texexec --lua $SOURCE%s' % once,
+# Limit to 500MB of virtual memory
+contextBuilder = Builder(action='ulimit -v 512000; nice texexec --lua $SOURCE%s' % once,
                          suffix='.pdf',
                          src_suffix='.tex')
 env.Append(BUILDERS={'Context': contextBuilder})