[IPython-dev] interrupting local kernels

Matt Terry matt.terry@gmail....
Fri Feb 24 13:33:11 CST 2012


I agree, but i think local interrupts would be a very useful stop gap
until the nanny process is implemented.  Personally, I'm willing to
hack on local interrupt issue, but I don't have the spare attention
for the more general problem.

-matt

On Fri, Feb 24, 2012 at 10:58 AM, MinRK <benjaminrk@gmail.com> wrote:
> The nanny process is ultimately  the way we need to go, otherwise you won't
> ever be able to interrupt remote kernels.
>
> On Thu, Feb 23, 2012 at 23:04, Matt Terry <matt.terry@gmail.com> wrote:
>>
>> I want to be able to interrupt an ipython kernel that is local to my
>> machine, but not owned by the current process.  I recognize that the
>> general problem of interrupting a truly remote kernel is a harder
>> problem and i'm not explicitly not addressing that.  However, I think
>> interrupting a local kernel is worth having a special case.
>>
>> All you need to interrupt a local kernel is its pid, so you can send a
>> SIGINT to the appropriate process.  The only way I can think of to get
>> that information is to ask the remote kernel (over the shell channel)
>> to return the output of "os.getpid()".  The kernel might restart and
>> change pid, so you'd have to poll.  This seems ugly and failure prone.
>>
>> What you need is
>> A) the kernel to have a nanny that always knows what the kernel's pid is
>> or
>> B) the kernel to communicate its pid someway other than over the shell
>> channel
>>
>> What about using the heartbeat channel to echo the pid?  To my
>> understanding, the heart beats even if the kernel is chugging away.
>> We could have the heartbeat channel return the pid instead of the
>> uuid, or we could return them both.  Alternatively, we could pid
>> information in a file in .ipython/somewhere, but that seems
>> potentially contentious.
>>
>> -matt
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>


More information about the IPython-dev mailing list