Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 055d139485e2350d995e0fa79ac9174c891e4694db40f45bfce5cc37c664186b
Ticket: a35d210bfcd3d1785dd7764d957b20fec35b55d1
exec:ed process killed with parent
User & Date: anonymous on 2022-11-30 09:01:43
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    I have a GUI that under certain conditions may restart itself. On Windows (11) I noticed that on the second restart, the exec:ed child process is killed when the parent process exits. I was able to reproduce this behavior with a small test script attached below. The second time 'Restart' is pressed the child will exit immediately (with the parent). It works as expected under Linux.
    ---------------------
    proc restart {} {
        global argv0
        global xcount
    
        exec [info nameofexecutable] $argv0 [expr {$xcount + 1}] &
        destroy .
    }
    
    if {[llength $argv] > 0} {
        set xcount [lindex $argv 0]
    } else {
        set xcount 1
    }
    
    package require Tk 8.6
    ttk::label .l -text "Invocation #$xcount"
    ttk::button .b0 -text "Restart" -command [list restart]
    ttk::button .b1 -text "Quit" -command [list destroy .]
    grid .l  -row 0 -column 0 -sticky ew -pady 4 -padx 2 -columnspan 2
    grid .b0 -row 1 -column 0 -pady 2 -padx 2
    grid .b1 -row 1 -column 1 -pady 2 -padx 2
    
  5. foundin changed to: "8.6.13"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "5265eac58c4c5f6313ef60531ea3f8bfbfb9f15f"
  10. resolution changed to: "None"
  11. severity changed to: "Severe"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "16. Commands A-H"
  15. title changed to: "exec:ed process killed with parent"
  16. type changed to: "Bug"