Skip to content

Commit 87dda97

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 3e321f6 commit 87dda97

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
@@ -1874,8 +1874,10 @@ during a session now sees the diversions, not the wire.
18741874

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

18801882
### WebSocket transport removed
18811883

0 commit comments

Comments
 (0)