ipython / ipython/ipykernel

ipykernel ignore signals

未關閉
#946 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
734
分支
412
平均合併
1 天 5 小時
30 天內合併 PR
8

描述

Runned as server in Docker:
```bash
$ kill -QUIT 1
$ kill -TERM 1
$ kill -KILL 1
$ ps
PID USER TIME COMMAND
1 usr 0:01 /usr/local/bin/python -m ipykernel --config=./ipykernel_conf.py
```
in docker-compose.yml:
```yml
services:
ipykernel:
command: ["/usr/local/bin/python", "-m", "ipykernel", "--config=./ipykernel_conf.py"]
stop_signal: "SIGQUIT"
stop_grace_period: "10s"
```

In my other script, I register a signal to break the loop. But I did not find this code in ipykernel.
```python
import signal
import time

ISRUN = True

def sighandler(signum, frame):
global ISRUN
ISRUN = False
signal.signal(signal.SIGTERM, sighandler)
signal.signal(signal.SIGQUIT, sighandler)

while ISRUN:
time.sleep(1)
```

貢獻指南

開啟貢獻指南

研究方向

Start by reproducing the signal behavior with the `python -m ipykernel --config=./ipykernel_conf.py` command and the provided Docker Compose settings. Trace signal handling from the `python -m ipykernel` entry point, then verify that TERM and QUIT produce the intended shutdown behavior in Docker.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
docker, docker-compose, jupyter-notebook, python
領域
backend, infrastructure
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。