Artifacts Associated With Ticket 230478
Ticket change [55148066ae] (rid 94067) by dgp on 2001-01-30 17:55:05:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The [fcopy] docs say: Without the -command option, fcopy blocks until the copy is complete and returns the number of bytes written to outchan. In revision 1.28 of generic/tclIO.c in CopyData(), how does the code avoid the "return TCL_OK" on line 7066 and line 7109 when no -command option has been specified (i.e. cmdPtr == NULL) ? If these returns are not avoided, then [fcopy] will not block until the copy completes, and will return an empty string instead of the number of bytes copied, right? Is there something subtle and tricky I'm missing that guarantees this problem will not arise?
- foundin initialized to: "obsolete: 8.4a2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "25. Channel System"
- title initialized to: "another [fcopy] bug?"
- type initialized to: "Bug"
Ticket change [d2bc4fcd6b] (rid 113585) by dgp on 2001-04-04 22:35:42:
- assignee changed to: "andreas_kupries"
- icomment:
Logged In: YES user_id=80530 Andreas, since you are already looking at [fcopy]/ CopyData(), could you take a look at this?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [4b6006c1d8] (rid 126700) by andreas_kupries on 2001-04-05 00:26:07:
- icomment:
Logged In: YES user_id=75003 Yes, there is some trickery. If you look at 'TclCopyChannel', the procedure which calls 'CopyData' you will find that it configures the channels into blocking mode if there is no command (ptr). This means that the read calls will only return in case of an error (size < 0) or if the buffer is full or EOF was reached. Only in the case of EOF size == 0 is possible and EOF is handled specially at that point (breaking out of the loop). It also means that there is never a background flush running, so it avoids the second return too.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [c05498b799] (rid 102384) by dgp on 2001-04-05 01:55:22:
- icomment:
Logged In: YES user_id=80530 I think I get it now. Feel free to close/invalidate this report. Or add some source code comments if you think others will become similarly concerned.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [b650b3bee2] (rid 125398) by andreas_kupries on 2001-04-05 03:37:59:
- closedate changed to: "2001-04-04T20:37:59"
- closer changed to: "andreas_kupries"
- resolution changed to: "Invalid"
- status changed to: "Closed"