Overview
| Artifact ID: | db98f2f214d257ee7d0a2086fafc2809850cce7f |
|---|---|
| Ticket: | 6141c1518631072728c55b18a6ae4ebbf1a0a3a2
Transchan loses input data when written to |
| User & Date: | ferrieux on 2016-01-20 22:35:24 |
Changes
- icomment:
Sure. The crux of the problem is a confusion between two kinds of "r+" channels: (1) those that are truly both readable and writable, and where write+seek+read can give you back what you wrote; and (2) those that are in fact hiding two independent things, one readable, the other writable, with no diaphony ever (e.g. pipes and sockets). The idea of the patch was that for the write+seek+read invariant to hold, you need to get rid of buffering. Hence flushing before reading, and discarding input before writing. Of course the patch was intended only for kind (1). Since channels of kind (1) are seekable and those of kind (2) are not, we've got a drug target :)
- login: "ferrieux"
- mimetype: "text/plain"