Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-16
23:35 • Closed ticket [218152ffff]: Interrupting an evaluation plus 3 other changes artifact: 5affdf81be user: dgp
23:35 • Open ticket [218152ffff]. artifact: cd4f5287fd user: dgp
2000-10-26
08:15 • Closed ticket [218152ffff]. artifact: 9334d11919 user: welch
00:53 • New ticket [218152ffff]. artifact: d338caae56 user: nobody

Interrupting an evaluation

Closed / Fixed218152ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:53:48
OriginalBugID: 2157 RFE
Version: 8.0.4
SubmitDate: '1999-06-03'
LastModified: '1999-09-18'
Severity: LOW
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: Solaris
OSVersion: 2.5, 2.6, 7
Machine: Other
FixedDate: '2000-10-25'
ClosedDate: '1999-09-18'


Name:
Anthony Mallet

CustomShell:
Redefined Tcl_ExecuteByteCode

DesiredBehavior:
Would be great if there were a possibility to interrupt a byte-code
    evaluation in a non-event-driven application.
    
    Imagine that you start to execute the following code :
    while { 1 } { }
    If you hit ctrl-C, this kills the interpreter.
    If you have intalled a signal handler, the recommended way to take any
    action within the handler is to AsyncMark an asynchronous event, and let
    tcl proceed with it when it comes back to a safe state. But this does
    not work in my case since the infinite loop never makes a call to
    'update' or anything that deals with events.
    
    Today, the workaround I use is to compile a modified version of
    Tcl_ExecuteByteCode that checks a global flag before executing every
    instruction, and stops evaluating whenever this flags becomes true (the
    flag is set in a signal handler).



This seems to be what we already have Tcl_CreateTrace
(command tracing) for. 
-- 09/18/1999 hobbs
welch Closed ticket [218152ffff]. [History diff]2000-10-26 08:15:56
dgp Open ticket [218152ffff]. [History diff]2001-04-16 23:35:24
dgp Closed ticket [218152ffff]. [History diff]2001-04-16 23:35:49
Log in (anonymous is fine) to add a comment.