file copy from zipfs does not terminate
See https://groups.google.com/forum/#!topic/comp.lang.tcl/5Jx7VY0ggC8 for original context. The objective is to have support for event driven/background operations on the ZIP file system in order to use e.g. fcopy with -command option to asynchronously transfer data from a file in the ZIP file system to a socket. See also the corresponding ticket on www.androwish.org in https://www.androwish.org/index.html/info/e1c81d1c2216f3b7
1ae447d307Fix [0654cecae1]: zipfs channels never generated file events, so [fileevent] handlers never fired and [fcopy -command] from a zipfs file hung. While a zipfs channel is watched, notify it from a zero-delay timer. check-in2026-10-12 16:53:00c1da2b3f2cPending ticket [3018050fff]: fcopy-from-starkit hangs on Windows plus 4 other changes ticket2026-10-12 16:05:47
Meanwhile the issue seems solved so far, see these check-ins on www.androwish.org: https://www.androwish.org/home/info/4d44284373 https://www.androwish.org/home/info/880df261cc
Still happens in 9.0 and 9.1: the watch proc of zipfs channels does nothing,
so fileevent handlers never fire and fcopy -command
from a zipfs file never copies anything.
Proposed fix in branch zipfs-channel-events: a zipfs channel is always ready, so while it is watched a zero-delay timer notifies the channel, as for the zlib transform and reflected transforms.
The AndroWish fix uses a per-thread event source and a table of watched channels instead. It delivers real file events, but needs much more code and per-thread data that has to be handled carefully at thread exit (its second check-in fixes that). Both need a thread action proc for channel transfer between threads; the branch adds one that cancels the timer.
Merged to [trunk] and core-9-0-branch
Many thanks!