Skip to content

Commit 722ff77

Browse files
committed
Scope the fd 0 watchdog migration example to POSIX
os.getppid() never changes on Windows, and the polled-fd pattern being migrated is POSIX-only to begin with. No-Verification-Needed: docs-only change
1 parent 7374202 commit 722ff77

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

docs/migration.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,8 +1866,10 @@ during a session now sees the diversions, not the wire.
18661866

18671867
One pattern needs migrating: a watchdog thread that `poll()`s fd 0 for `POLLHUP` to
18681868
detect a vanished client will no longer fire, because the null device never reports
1869-
it. Watch the parent process instead (for example, exit when `os.getppid()`
1870-
changes); that works on both v1 and v2 and does not depend on descriptor layout.
1869+
it (a POSIX-specific pattern; `select.poll` does not exist on Windows). Watch the
1870+
parent process instead: on POSIX, exit when `os.getppid()` changes, which happens
1871+
when the client dies because orphaned processes are reparented. That works on both
1872+
v1 and v2 and does not depend on descriptor layout.
18711873

18721874
### WebSocket transport removed
18731875

0 commit comments

Comments
 (0)