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 a05a298afd1c3997c7f07767511e1055c8db9fc8..05bd779b8305fdcc75f5603fbad8d05b145f836a 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})