local.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:reframe 作者: eth-cscs 项目源码 文件源码
def submit(self):
        # `chmod +x' first, because we will execute the script locally
        os.chmod(self._script_filename,
                 os.stat(self._script_filename).st_mode | stat.S_IEXEC)

        # Run from the absolute path
        self._f_stdout = open(self.stdout, 'w+')
        self._f_stderr = open(self.stderr, 'w+')

        # The new process starts also a new session (session leader), so that
        # we can later kill any other processes that this might spawn by just
        # killing this one.
        self._proc = os_ext.run_command_async(
            os.path.abspath(self._script_filename),
            stdout=self._f_stdout,
            stderr=self._f_stderr,
            start_new_session=True)

        # Update job info
        self._jobid = self._proc.pid
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号