def __init__(self, project, arguments=None, stdout="file", stdin=None, timeout=10.0, name=None):
if not name:
name = "process:%s" % basename(arguments[0])
ProjectAgent.__init__(self, project, name)
self.env = Environment(self)
if arguments is None:
arguments = []
self.cmdline = CommandLine(self, arguments)
self.timeout = timeout
self.max_memory = 100*1024*1024
self.stdout = stdout
self.popen_args = {
'stderr': STDOUT,
}
if stdin is not None:
if stdin == "null":
self.popen_args['stdin'] = open('/dev/null', 'r')
else:
raise ValueError("Invalid stdin value: %r" % stdin)
评论列表
文章目录