Control-C exits Julia after pylab.plot()
- 主要语言
- Julia
- 星标
- 1.5k
- 派生
- 186
- PR 合并指标
- 30 天内没有已合并 PR
描述
After the wx event loop gets started, SIGINT kills the Julia repl instead of interrupting the currently executing command. To reproduce:
``` julia
julia> using PyCall
julia> @pylab
julia> pylab.plot(1);
```
At this point, if I close the plot and press ^C, Julia exits.
In the IPython source, it says that [wx resets the SIGINT handler when it's loaded](https://github.com/ipython/ipython/blob/master/IPython/lib/inputhookwx.py#L120), so I tried running `ccall(:jl_install_sigint_handler, Void, ())` the first time `app.o != pynothing` in [gui.jl](https://github.com/stevengj/PyCall.jl/blob/master/src/gui.jl#L98). This is an improvement, in that ^C now works if something is running, but something is still off, since ^C without anything running exits Julia instead of returning to the prompt.
贡献指南
这个仓库没有索引到贡献指南
调研方向
先使用 PyCall、@pylab 和 pylab.plot(1) 进行复现,然后阅读 src/gui.jl 中 app.o 处理附近的代码,以及相关的 IPython inputhookwx.py SIGINT 逻辑。当关闭绘图并按下 ^C 能中断正在进行的工作而不退出 Julia,并且在空闲提示符处按下 ^C 会返回提示符时,修复就完成了。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- julia, python
- 领域
- desktop
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100