Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 910a7d8dc949cd8911c2c9e70a03e9f1fd0d4c57
Ticket: 3059220fffffffffffffffffffffffffffffffff
On Windows non-blocking pipe does not flush
User & Date: ferrieux on 2010-09-04 15:24:11
Changes

  1. icomment:
    Weird indeed :/
    Not reproducible in Linux (too bad since we have strace).
    
    Just one minor comment about "non-blocking I/O does not need the event loop if filevents are not being used":
    The truth is that a nonblocking write that has been only partially done, because of a full pipe buffer for example, creates an internal "fileevent writable" to resubmit the rest when the channels unlocks. So this secondary IO needs the event loop. But in your example, the tiny strings you write to the child cannot be blamed for filling a pipe buffer (typically 4k)...  Hence you are right that all these writes should be done immediately and completely.
    
    Random shots to probe the ugly internals of Windows IO:
     - try unbuffered
     - play with the crlf/binary translation
     - replace  [puts \n] with [puts -nonewline \n\n]
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"