Skip to content
Tcl Source Code Artifact [5f03592f0b]
Login

Artifact [5f03592f0b]

Artifact 5f03592f0bf6563952125584094f4099ffcc36cc7d5e96a1583e8694ba13adf8:

Ticket change [5f03592f0b] - Pending ticket [f1a25e8a5090333d|f1a25e8a50]: <i>New thread panics &quot;Tcl_InitNotifier: could not create trigger eventfd&quot; when stdin is closed</i> plus 6 other changes by jan.nijtmans on 2026-11-17 11:27:12.
D 2026-11-17T11:27:12.588
J assignee jan.nijtmans
J comment ```\r\nclose\sstdin\r\nset\st\s[testthread\screate\s{testthread\swait}]\r\n```\r\nrun\sin\stcltest\spanics\swith\r\n```\r\nTcl_InitNotifier:\scould\snot\screate\strigger\seventfd\r\n```\r\nEvery\snew\sthread\sfails\sthe\ssame\sway.\sFor\sexample,\s`thread::create`\sor\s`tpool::post`\sfrom\sthe\sThread\spackage\safter\s`close\sstdin`.\r\n\r\nWith\sstdin\sclosed,\sfd\s0\sis\sfree,\sso\s`eventfd()`\sin\sthe\snew\sthread's\s`PlatformEventsInit()`\sgets\sfd\s0.\s`unix/tclEpollNotfy.c`\streats\sthat\sas\san\serror\s(`if\s(tsdPtr->triggerEventFd\s<=\s0)`)\sinstead\sof\schecking\sfor\s`<\s0`.\r\n\r\n`TclpFinalizeNotifier()`\smakes\sthe\ssame\sassumption:\sit\sonly\scloses\sthe\seventfd,\strigger\spipe\sand\sepoll/kqueue\sfds\sif\sthey\sare\snon-zero,\sso\sa\snotifier\sfd\sthat\sis\s0\sis\snever\sclosed.\s`unix/tclKqueueNotfy.c`\shas\sthe\ssame\scheck\sin\sfinalize.\r\n\r\nAffects\s9.0\sand\s9.1\son\sLinux,\swhere\sepoll\sis\sthe\sdefault\snotifier.\s8.6\sis\snot\saffected.
J icomment Fixed\sin\s[64ce9de2a3|trunk]\r\n\r\nOK\sfor\sbackport\sto\s9.0\s(not\sdone\syet)
J login jan.nijtmans
J mimetype text/x-fossil-wiki
J resolution Fixed
J status Pending
K f1a25e8a5090333da9c02de51f04f2914fea7bfa
U jan.nijtmans
Z aff7cbe1adfb990e512b150970a44143