ipython / ipython/ipykernel

ipykernel ignore signals

Đang mở
#946 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
734
Fork
412
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
8

Mô tả

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)
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
docker, docker-compose, jupyter-notebook, python
Lĩnh vực
backend, infrastructure
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.