I'm writing a starkit which makes heavy use of virtual filesystems. When the starkit is executed via a tclkit (I used Windows [non-UPX] tclkit-8.4.16.exe) or compiled into a starpack and run, an attempt to write to a virtual file causes an error to be thrown of the following sort:
error writing "rechan151": bad file number
while executing
"puts $f $backup_control"
However, when a Tcl interpreter is started and the starkit is executed via the "source" command, the application starts up fine and the virtual file is written to without error.
The virtual file written to is not in the starkit's virtual filespace, and doesn't make direct use of any tclkit vfs code, it's in an entirely separate virtual filesystem which is loaded and mounted on startup. It appears that some operation within the tclkit code mishandles file channels generated by virtual filesystems.
I've wrapped a test starkit which manifests the error on startup. If you want to investigate this issue I will send it to you if you tell me how you'd like to receive it.
Steve Huntley stephen.huntley@alum.mit.edu
- 2008-02-22 Steve Huntley
Created
- 2008-02-24 jcw
Only cause I can think of is the "rechan" code in tclkit. I intend to get rid of that messy code in in 8.5 one day, using the new "chan create" command instead. Suggestions on how to improve tclkit welcome.
- 2008-02-24 jcw
(Changed: stat)
