INNER CODE UNIT · Python

__init__

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

    def __init__(self, result_queue, process_id):
        self.process_id = process_id
        self.result_queue = result_queue
        self.popen_process = None

    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,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…