Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c1502e06c2a271110e6b5089935a0d6796bb4f55a07bacce30db2547c7eabb44
Ticket: 21dbc600ae0a005a7f879a05580550a8da257b14
exec hangs, iff stdin & stdout both were previously closed.
User & Date: avl42 on 2022-12-06 12:06:26
Changes

  1. comment changed to:
    simplest test script:
       close stdin; close stdout; exec true
    
    Workaround (assuming that original stdin & -out just need to be closed):
       close stdin; close stdout; open /dev/null r; exec true
    
    In either case: exec first creates a pipe, and while the child runs,
    the parent waits on that pipe for EOF (probably to be initiated
    from another thread).
    
    With at least one of stdin or stdout NOT closed (or re-opened afterwards),
    the EOF on that pipe is seen, but with BOTH stdin/-out closed, nothing
    ever closes the write-end of the pipe.
    
    PS: that pipe is NOT the one by which the main process communicates to the child.
    
  2. login: "avl42"
  3. mimetype: "text/plain"