In knoboo.kernel.engine.server.py, the method serve_forever has an exception
handler for KeyboardInterrupt; this is to prevent the server from being
shutdown by accident.

When the interrupt button in the notebook is pressed,
knoboo.kernel.process.EngineProcessControl sends INT signals to the engine
process until it can see it has been interrupted.

Running the engine server in Python, I can repeatedly send INT signals with
out disconnecting any clients that happen to be connected.

The same situation, but running the server with sage's python results in
clients being disconnected from the engine server.

You can see this by pushing the Interrupt button in Knoboo when the engine
is running idle (no computation requests are being handled). Sage will get
into a funny, but recoverable (by re-evaluating), state, and the log will
indicate a disconnected client.

This isn't a big deal; it's just a quirk particular to how I implemented
sending to the engine processes that I can fix.
I am mostly just curious about what you did with Sage to get this to work in
general.

Thanks,
-Dorian

On Mon, Jun 9, 2008 at 3:38 PM, William Stein <[EMAIL PROTECTED]> wrote:

>
> On Mon, Jun 9, 2008 at 3:05 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> wrote:
> >
> > Hi,
> > I have been revisiting some process control code in Knoboo, and
> > realized
> > how well Sage responds to SIG-INT compared to standard Python. It
> > basically
> > works too good... ;)
>
> Could you please make this question much more precise?  Specifically
> which sig-int handling are you refereeing to?    Could you give a specific
> example?
>
>  -- William
>
> >
> > Can somebody point me to the most relevant pieces of code/
> > documentation
> > concerning signal handling in Sage so I can learn more about how it
> > works.
> >
> > Is this improvement over plain Python implemented in Python, a C
> > extension,
> > or what? And, why hasn't this improvement made it into standard
> > Python?!?
> >
> > Thanks,
> > -Dorian
> >
> >
> > >
> >
>
>
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washington
> http://wstein.org
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to