Artifacts Associated With Ticket c6b86cbfe4a1e140
Ticket change [1025566ebd] (rid 146322) by pokute on 2016-04-15 16:49:51:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I have been sending mail through exim using a non-blocking Tcl pipe for many years. After upgrading to Debian Jessie, the mail is truncated. The code that now fails to send the full stream (truncates to 64k) after working for many years: set pipe [ open "|$sendmail -oi -t" a+ ] fconfigure $pipe -blocking off fconfigure $pipe -buffering line puts $pipe $mail ::close $pipe Turning blocking on fixes the truncation issue. I'm not saying that the current behavior is wrong, just that it is changed. - foundin initialized to: "8.6 (Debian Jessie)"
- is_private initialized to: "0"
- login: "pokute"
- priority initialized to: "5 Medium"
- private_contact initialized to: "b3541b092a7a888405f44df9381de9a06be14ad9"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "pokute"
- subsystem initialized to: "16. Commands A-H"
- title initialized to: "non-blocking IO write truncation"
- type initialized to: "Bug"
Ticket change [f865611309] (rid 146325) by ferrieux on 2016-04-16 07:02:09:
- 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.
- login: "ferrieux"
- mimetype: "text/plain"
- icomment:
Ticket change [652a7c0467] (rid 146326) by ferrieux on 2016-04-16 07:02:40:
- closedate changed to: "2457494.79352321"
- closer changed to: "ferrieux"
- login: "ferrieux"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"