Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 078d303703d90e24d1823e30f13e038323e3ec12c010f38fd6433db62a709fb3
Ticket: 21dbc600ae0a005a7f879a05580550a8da257b14
exec hangs, iff stdin & stdout both were previously closed.
User & Date: avl42 on 2022-12-06 11:45:49
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    simplest test script:
       close stdin; close stdout; exec true
    
    Workaround (assuming that 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 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.
    
  5. foundin changed to: "8.6.8"
  6. is_private changed to: "0"
  7. login: "avl42"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "2287a4a5f84eadc47fdc912609f4f98319372d33"
  10. resolution changed to: "None"
  11. severity changed to: "Severe"
  12. status changed to: "Open"
  13. submitter changed to: "avl42"
  14. subsystem changed to: "16. Commands A-H"
  15. title changed to:
    exec hangs, iff stdin & stdout both were previously closed.
    
  16. type changed to: "Bug"