INNER CODE UNIT · Python

fcb

Dramwig/FlowLine · flowline/utils/__init__.py:17

    def fcb(self, cmd):
        try:
            signal.signal(signal.SIGTERM, self._handle_terminate)
            
            stdout_file = f"log/{self.process_id}.out"
            stderr_file = f"log/{self.process_id}.err"
            if not os.path.exists("log"):
                os.makedirs("log")
            
            with open(stdout_file, 'w', encoding='utf-8') as stdout_f, \
                 open(stderr_file, 'w', encoding='utf-8') as stderr_f:
                self.popen_process = subprocess.Popen(
                    cmd,
                    stdout=stdout_f,
                    stderr=stderr_f,
                    shell=True,
                )
                self.popen_process.wait()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…