Manifest of check-in
[65772037dd]
- Fix [49538c09c8]: TclUnixWaitForFile: infinite wait reads uninitialized "now" and may return early. With a negative timeout, "continue" in the do-while loop evaluated "abortTime > now" with an uninitialized "now", so if poll() returned without a requested event (e.g. EINTR on a signal), the function could return 0 although it should wait forever. Use while (1) with an explicit timeout check, as in the macOS version. New test event-13.9.
by
serhiy.storchaka on
2026-09-25 17:38:17.
B 2ffe47a9cfbd9f5f2c97e7be830f3384f753c2f4e9564517f1920a4b4f4afcf0
C Fix\s[49538c09c8]:\sTclUnixWaitForFile:\sinfinite\swait\sreads\suninitialized\s"now"\sand\smay\sreturn\searly.\sWith\sa\snegative\stimeout,\s"continue"\sin\sthe\sdo-while\sloop\sevaluated\s"abortTime\s>\snow"\swith\san\suninitialized\s"now",\sso\sif\spoll()\sreturned\swithout\sa\srequested\sevent\s(e.g.\sEINTR\son\sa\ssignal),\sthe\sfunction\scould\sreturn\s0\salthough\sit\sshould\swait\sforever.\sUse\swhile\s(1)\swith\san\sexplicit\stimeout\scheck,\sas\sin\sthe\smacOS\sversion.\sNew\stest\sevent-13.9.
D 2026-09-25T17:38:17.784
F tests/event.test 2f4ff13b84d3fceed02b2f2ba15663435bb6cf4e517b947ac5c911a5161ecf1f
F unix/tclUnixNotfy.c 48c4c51e5df36abbe293129fa4cb95748b67b8e722c233b9e73024bec4d4655a
P 2ffe47a9cfbd9f5f2c97e7be830f3384f753c2f4e9564517f1920a4b4f4afcf0
R 3d1ca4fe01e6ab5ddff18bc49edc45fb
T *branch * unix-waitforfile-infinite-wait
T *sym-unix-waitforfile-infinite-wait *
T -sym-main *
T -sym-trunk *
U serhiy.storchaka
Z 5956aef5cb97da01e6b2391239ffdd4e