Overview
| Artifact ID: | ed41d4f516b8e846e1a4037ff0b905fb1bb6df7c |
|---|---|
| Ticket: | 5bfe3de008e6f7b5863619a4f9c801d040ff5ab8
^Z appended to sourced VFS files |
| User & Date: | andy on 2017-08-14 16:13:59 |
Changes
- icomment:
It's unfortunate that the EOF character "append" code assumes it's in fact sought (seeked?) to the end of file before it does its business. I have a question about that. Does it first check if the next character in the file is the EOF character, then elect not to write an EOF? I think more likely it assumed that the rest of the I/O system would never let the file pointer pass the EOF, then writes the EOF character unconditionally, "knowing" it would either overwrite the existing EOF, or add one if it wasn't there already. This theory is consistent with the behavior demonstrated by your "Pest" code. Also, as you discovered, [seek] has nothing to do with triggering the "append EOF". It's [close] that does that. From the [chan configure -eofchar]/[fconfigure -eofchar] man page: "For output, the end-of-file character is output when the channel is closed." I think maybe the [close]/[chan close] man page should be updated to mention this as well.
- login: "andy"
- mimetype: "text/plain"
- username: "Andy Goth"