(fd: int)
| 105 | |
| 106 | @staticmethod |
| 107 | def _write_lock_info(fd: int) -> None: |
| 108 | # No suppression: a write failure must reach the acquisition rollback so it never publishes a half-written |
| 109 | # marker as held state. The optional third line is this process's start token, absent when the platform |
| 110 | # exposes no proven start time, in which case a reader falls back to PID-only liveness. |
| 111 | info = f"{os.getpid()}\n{host_name()}\n" |
| 112 | if (token := process_start_token(os.getpid())) is not None: |
| 113 | info += f"{token}\n" |
| 114 | write_all(fd, info.encode()) |
| 115 | |
| 116 | @property |
| 117 | def pid(self) -> int | None: |
no test coverage detected