Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3a07fa98022115172fc5024a5caa9695785545e7
Ticket: 2529137fffffffffffffffffffffffffffffffff
tcl core dumps when exec'd program exits with a signal
User & Date: jkfellin on 2009-01-22 18:47:11
Changes

  1. assignee changed to: "andreas_kupries"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    This occurs in tcl8.5.6, in porting to UWIN running on a i686 platform. The expected behavior is tclsh should not core dump when an exec'd command exits with a signal.
    
    When a process started by the exec command terminates with a signal, tcl core dumps by referencing the wait status as a pointer to a string. 
    The problem code is in generic/tclPipe.c:TclCleanupChildren line 331 
      Tcl_AppendResult(interp, "child killed: ", p, " waitstatus x%x\n", waitStatus, NULL);
    
    I've corrected the problem by changing the above code to the following:
    
    sprintf(msg2, "x%4.4x\n", waitStatus);
    Tcl_AppendResult(interp, "child killed: ", p, "waitstatus ", msg2, NULL);
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "jkfellin"
  10. subsystem changed to: "24. Channel Commands"
  11. title changed to:
    tcl core dumps when exec'd program exits with a signal
    
  12. type changed to: "Bug"