Overview
| Artifact ID: | 282c1a24d460f8bbac9abf5bff7f43430d3b2e7e |
|---|---|
| Ticket: | 734138ded8cca1906d920b837ec1cfd4bc811282
close does not report error which was saved by a failing background flush (socket-14.11.1) |
| User & Date: | oehhar on 2014-05-30 13:43:53 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
<h1>Symptom</h1> Test socket-14.11.1 fails on Windows and on Linux with a localhost resolving to ::1 and 127.0.0.1 <h1>Issue</h1> When a background flush (for example invoked by a reported writable fileevent) fails, the error code is saved. If this socket is closed, the error should show up. <h1>Demo</h1> <h2>Correct behaviour</h2> Version [9b3b3adf47] (before commit of [bug-13d3af3ad5]) showed the IMHO correct behaviour. Here is a log in a windows tclsh: <verbatim> % set h [socket -async localhost 30001] sock01AC6220 % fconfigure $h -blocking 0 % puts $h Hi % flush $h % fileevent $h writable {set ::x 1} % vwait x % close $h socket is not connected % </verbatim> What happens: * in the first row, a socket connect on an unopened port is started (which would take on a syncroneous connect up to 10 seconds on windows to report "connection refused" so the following commands are executed while connectiong). * then it is set to non-blocking and a write is issued. * The drivers send routine is called and returns with "EWOULDBLOCK" * fileevent and vwait wait until the connect fails. The fileevent reporting of the driver invokes, that the tclIO will call send on the driver which will report "socket is not connected" posix error code. This is stored by tclIO * close is executed. The socket is correctly closed and the stored error is shown to the user. <h2>Trunk behaviour</h2> With the current trunk, one gets: <verbatim> % set h [socket -async localhost 30001] sock01A26150 % fconfigure $h -blocking 0 % puts $h Hi % flush $h % fileevent $h writable {set ::x 1} % vwait x % close $h % </verbatim> So, the error does not show up. - foundin changed to: "trunk"
- is_private changed to: "0"
- login: "oehhar"
- priority changed to: "5 Medium"
- private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "oehhar"
- subsystem changed to: "25. Channel System"
- title changed to:
close does not report error which was saved by a failing background flush (socket-14.11.1)
- type changed to: "Bug"