[IPython-dev] about ipython-zmq
Sun Jul 25 17:55:16 CDT 2010
On Sun, Jul 25, 2010 at 2:38 PM, Brian Granger <email@example.com> wrote:
> 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?
>> 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
> 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).
More information about the IPython-dev