home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / tcl / 2124 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  1.1 KB

  1. Path: sparky!uunet!think.com!ames!agate!usenet.ins.cwru.edu!slc6!trier
  2. From: trier@slc6.ins.cwru.edu (Stephen C. Trier)
  3. Newsgroups: comp.lang.tcl
  4. Subject: Re: Destroying interpreters
  5. Date: 16 Dec 1992 16:51:04 GMT
  6. Organization: Case Western Reserve University, Cleveland OH (USA)
  7. Lines: 15
  8. Message-ID: <1gnmpoINN65r@usenet.INS.CWRU.Edu>
  9. References: <1992Dec10.230322.20829@cpu.com>
  10. NNTP-Posting-Host: slc6.ins.cwru.edu
  11.  
  12. I solved this problem (on MS-DOS) with an ugly hack: The interpreter
  13. that wants to die sets a flag (in C) that says "terminate this interpreter".
  14. The main program loop (in C) periodically checks these flags and kills
  15. any interpreters that need to terminate.
  16.  
  17. I ended up using this flag as a chance to kill the window associated with
  18. the interpreter, too.  I could have used an interpreter-destruction callback,
  19. but it seemed pointless when I couldn't destroy the interpreter from within
  20. itself.
  21.  
  22. -- 
  23. Stephen Trier                      "We want to offer you a price that you
  24. Network software type               just can't afford to take advantage of."
  25. Case Western Reserve University         - Sales blurb from HSC Software
  26. trier@ins.cwru.edu
  27.