3 MAX_LOCKED_MEMSIZE = 1024 * 1024 * 1024 # 1 GB
4 SHMMAX = 1024 * 1024 * 1024 # 1 GB
6 SLICE = "princeton_vcoblitz"
12 if __name__ == "__main__":
14 # expand lockable memory
15 resource.setrlimit( resource.RLIMIT_MEMLOCK, (MAX_LOCKED_MEMSIZE, MAX_LOCKED_MEMSIZE) )
17 # ensure that shmmax is big enough.
18 os.system( "vspace -e " + SLICE + " --ipc sysctl -w kernel.shmmax=" + str(SHMMAX) )
20 # we'll echo argv into the prox pipe
21 args = sys.stdin.read().split()
23 print "args = " + str(args)
30 os.execv( args[0], args )
31 #os.execve( args[0], args, {'LD_LIBRARY_PATH': "/vservers/" + SLICE + "/lib:/vservers/" + SLICE + "/lib64:/vservers/" + SLICE + "/usr/lib:/vservers/" + SLICE + "/usr/lib64"} )
35 print "pid = " + str(pid)