From: Rick M. <obj...@gm...> - 2009-03-14 23:26:55
|
I'm a little under the weather today, so my mind is a little on the fuzzy side. The code that's there for the Windows version is essentially the same processing method that we inherited from IBM, and I can't claim that I understand why it is doing what it's doing....I am fairly convinced that that code is wrong, however. My best guess on this is that it allows you to escape out of code where something outside of the interpreter has control, such as running an internal command or stuck performing I/O. The first ctrl-C attempts to raise a halt condition, the second one allows the things to be terminated regardless. Unfortunately, this should be clearing the system indicator once the halt condition is raised, which would allow trapping more than once. There are some multi-threading considerations associated with this I've not sorted out yet. As for the unix version, I was not aware that this code was still commented out. If it appears to be working, then by all means it should be re-enabled. I believe I disabled it originally because haltAllActivities() was not working at one point. Rick On Sat, Mar 14, 2009 at 4:52 PM, Jean-Louis Faucher <jfa...@cs...> wrote: > > > Tested with rexxtry. > Under Windows, the first Ctrl-C is caught, but the second one ends the > process. > This is explicitely implemented in SystemInterpreter::processSignal : > when signalCount > 1 the Ctrl-C is no longer trapped... > Is there any reason to have this behavior ? I'd prefer a robust REPL when > using ooRexx as a command prompt :-) > > Under Linux, the first Ctrl-C stops the process... > If the code currently #if 0'ed in SystemInterpreter.cpp is re-activated then > Ctrl-C is trapped. > Must add this declaration to compile : > sigset_t newmask, oldmak; > > Unrelated remark : > processShutdown should probably call shutdown in this function (unix) : > void SystemInterpreter::processShutdown() > { > // now do the platform independent shutdown > Interpreter::processStartup(); > } > > Jean-Louis > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Oorexx-devel mailing list > Oor...@li... > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > > |