MCPcopy Create free account
hub / github.com/Louisym/MiniCC / check_size

Method check_size

tutorials/14_bash_engine_deep_dive.py:704–710  ·  view source on GitHub ↗

检查输出文件大小,返回 (大小, 是否超限)

(self)

Source from the content-addressed store, hash-verified

702 self._running = False
703
704 def check_size(self) -> Tuple[int, bool]:
705 """检查输出文件大小,返回 (大小, 是否超限)"""
706 try:
707 size = os.path.getsize(self.output_path)
708 return size, size > self.max_size
709 except FileNotFoundError:
710 return 0, False
711
712 def kill_process_tree(self, pid: int):
713 """杀死进程树 — 不只是主进程,还有所有子进程"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected