tcl core dumps when exec'd program exits with a signal
Closed / Invalid2529137fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2009-01-22 18:47:11
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);
jkfellinplain2009-01-23 01:47:11
File Added - 310214: tclPipe.diff
andreas_kupriesplain2009-01-23 02:19:54
I am a bit unclear on the platform reported. What is UWIN ?
andreas_kupriesplain2009-01-23 02:26:49
More questions. Looking at the CVS head of Tcl 8.5, file generic/tclPipe.c, rev 1.19) I do not find the code you are refering too. Grepping through the cvs heads of 8.[456] the phrase 'waitstatus x' is nowhere found. Goinf for 'child killed:' I find andreask@gila:~/activetcl/dbn/night> grep -rn 'child killed:' ~/lsf/tcl-8.[456] /home/andreask/lsf/tcl-8.4/generic/tclPipe.c:341: Tcl_AppendResult(interp, "child killed: ", p, "\n", /home/andreask/lsf/tcl-8.5/generic/tclPipe.c:332: Tcl_AppendResult(interp, "child killed: ", p, "\n", NULL); /home/andreask/lsf/tcl-8.6/generic/tclPipe.c:332: Tcl_AppendResult(interp, "child killed: ", p, "\n", NULL); and none of these places use waitStatus in the manner you describe. What revision is your file ? (Look at the RCS: comment at the top).
dkf Pending ticket [2529137fff].
[History diff]2009-01-24 22:22:43
sf-robotplain2009-03-19 01:52:38
allow_comments - 1 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
Log in (anonymous is fine) to add a comment.
Attachments:
- tclPipe.diff [download] added by jkfellin on 2009-01-23 01:47:11. [details]