Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e8f4880a6bde9b9d14f8ccdeba814964fad1219c
Ticket: 219149ffffffffffffffffffffffffffffffffff
bad interaction of input redirect from named pipe with backg
User & Date: ferrieux on 2013-03-24 22:27:40
Changes

  1. icomment:
    To me, [exec &] does the best compromise between asynchronicity and immediate reporting of lethal failures.
    
    The most popular "immediate failure" that [exec &] reports synchronously is one about the executable (not found, or improper rights). Nobody complains about that.
    
    In the same logic, it also reports *synchronously* about a failure to do the redirections. This is done by putting the open()  *before* the sync point. Again, everybody is happy about this behavior I guess.
    
    Then, in the specific case of a named pipe with nobody yet on the other end, this very open() will block. That's a necessary consequence of the above. It may surprise people because it is unlike the Bourne Shell, where the open()s lay completely within the forked process and no rendezvous will propagate the blocking. But I still think this rendezvous is a superior feature of Tcl, geared towards better error reporting.
    
    So I'd rather document the gotcha than overhaul a sane behavior.
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"