[IPython-dev] about ipython-zmq
Sun Jul 25 19:57:51 CDT 2010
On Sun, Jul 25, 2010 at 3:55 PM, Fernando Perez <email@example.com>wrote:
> On Sun, Jul 25, 2010 at 2:38 PM, Brian Granger <firstname.lastname@example.org>
> > I think it is a little dangerous to forward Ctrl-C. When there are two
> > processes like this I think it is very ambiguous as to what it means. I
> > would rather go with a frontend magic:
> > :kernel 0 kill
> I really think we do need Ctrl-C. It would be pretty awful to have an
> interactive environment (especially for the line-based, blocking ones
> like the plain terminal Omar is working on and Evan's) where Ctrl-C
> doesn't just stop the kernel, at least on platforms where we can send
> processes signals. Given that the frontend does no real computation,
> what other semantics should Ctrl-C have?
The case that I am worried about is if a frontend hangs. Almost *Everyone*
will try Ctrl-C to try to kill the frontend, but if the frontend is enough
alive to trap Ctrl-C and send it to the kernel, the kernel will get it
instead. If the kernel is running code, it is likely that someone will be
unhappy. This is especially true because of the possibility of multiple
frontends running the same kernel.
Like most GUI applications (and Mathematica for example), I think Ctrl-C
should be disabled and the frontend should provide a different interface
(possibly using a kernel magic) to signal the kernel. But let's talk more
> >> In order to do this, you'll need to know the PID of the kernel
> >> process, but Evan has already been making progress in this direction
> >> so you can benefit from his work. This code:
> >> already has a kernel launcher prototype with the necessary PID
> >> information.
> > Let's start to use the Popen interface of Python 2.6. It has a terminate
> > and kill method that gets around the PID stuf in a cross platform manner.
> subprocess kill only sends SIGKILL, while os.kill allows the sending
> of any signal, so I'm not sure it completely replaces os.kill for us.
> But for subprocess cleanup then yes, I'm all for using it (especially
> if it works reliably in Windows).
True, and we do probably want to allow Linux and Mac to send the other
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev