Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f865611309dfcdae80feb785678630231c56bcec
Ticket: c6b86cbfe4a1e14017a933f60afb33a4b980e2d5
non-blocking IO write truncation
User & Date: ferrieux on 2016-04-16 07:02:09
Changes

  1. icomment:
    Since TIP#398 (accepted and committed on 2012-04-28), nonblocking channels are no longer forced back to blocking when closing or exiting. This was needed to avoid blocking indefinitely on a possibly frozen peer.
    
    It appears that your code depended on the previous behavior. That's what is expected when tagging an evolution *POTENTIAL INCOMPATIBILITY*, which is the case of TIP#398.
    
    The reason why it hit you on an OS upgrade rather than a Tcl upgrade, I guess, is a random change of the exact buffer sizes involved (size of $mail, or size of kernel pipe buffers driving the maximal single-write).
    
    The "fix" (or rather, improvement of your code) is trivial and works on all Tcl versions: when you want to return to blocking semantics, just say so :)
    
    I guess your snippet is a synthetic one tailored to highlight the behavior (no one in his right mind would do that otherwise ;-), but the idea is to simply [fconfigure $pipe -blocking on] before closing.
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"