Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e35b345094f827b4ad684ef94216a1bb5e2abe40
Ticket: 471374ffffffffffffffffffffffffffffffffff
Child process doesn't detach with &
User & Date: chris_nelson on 2001-10-15 17:27:40
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    On at leats Soliaris (`uname -a` gives "SunOS urchin 5.8 Generic_108528-05 
    sun4u sparc SUNW,UltraSPARC-IIi-Engine"), scripts which start children with 
    & to background and detach the child process seem to hand on some channel 
    i/o when backgrounded.
    
    A sample parent script:
    
       set wish [file join [file dirname [info nameofexecutable]] wish]
       set script execTestChild.tcl
       set options [list >& /dev/null &]
       eval exec [list $wish $script] $options
       after 30000
    
    A stupid child script:
    
       tk_messageBox -message "I'm the child"
       exit
    
    Now, run the parent with:
    
       tclsh execTest.tcl &
    
    In 8.4a3, when the after has expired and the parent wants to exit, it hangs.  `jobs` reports:
    
       [1]  + Suspended (tty output)  ...
    
    Furthermore, the child freezes.  If a window is put over the message box and removed, the 
    message box does not redraw.  Foregrounding the parent and letting it terminate lets the child 
    redraw.  (Note that there is no actual output from the parent when it it foregrounded.)
    
    This behavior is not seen in 8.2.  That is, in 8.2, the parent exits cleanly without the tty output 
    suspension and the child appears to be properly detached.  
    
    
  4. foundin changed to: "obsolete: 8.4a3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "chris_nelson"
  9. subsystem changed to: "16. Commands A-H"
  10. title changed to: "Child process doesn't detach with &"
  11. type changed to: "Bug"