MCPcopy Index your code
hub / github.com/tirth8205/code-review-graph / write_pid

Function write_pid

code_review_graph/daemon.py:290–294  ·  view source on GitHub ↗

Write the current (or given) PID to the PID file.

(pid: int | None = None, path: Path | None = None)

Source from the content-addressed store, hash-verified

288
289
290def write_pid(pid: int | None = None, path: Path | None = None) -> None:
291 """Write the current (or given) PID to the PID file."""
292 pid_path = path or PID_PATH
293 pid_path.parent.mkdir(parents=True, exist_ok=True)
294 pid_path.write_text(str(pid or os.getpid()), encoding="utf-8")
295
296
297def read_pid(path: Path | None = None) -> int | None:

Calls

no outgoing calls