19 if __name__ ==
'__main__':
21 import os, sys, time, cPickle
26 import shared_functions
as sf
31 init_data = cPickle.load(f)
34 temp_path = init_data[
'temp_path']
36 os.environ[
'ISD_ROOT'] = temp_path
38 if not temp_path
in sys.path:
39 sys.path.insert(0, temp_path)
41 os.nice(init_data[
'niceness'])
43 kill_on_error =
not init_data[
'display']
44 signal_file =
'%s/kill' % temp_path
46 parent_tid = init_data[
'parent_tid']
47 tid = init_data[
'tid']
48 debug = init_data[
'debug']
50 print 'Tid=%d, nice=%d, debug=%s, temp=%s' % (tid, init_data[
'niceness'],
51 str(debug), temp_path)
54 filename = temp_path +
'/%d.log' % tid
55 log = logfile.logfile(filename)
57 os.dup2(sys.stdout.fileno(),log.fileno())
61 handler = FileBasedGrid.FileBasedRemoteObjectHandler(
62 kill_on_error, signal_file, temp_path, parent_tid, tid,
63 debug, init_data[
'nfs_care'])