ipython / ipython/ipykernel

ipykernel ignore signals

Ouverte
#946 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
734
Forks
412
Merge moyen
1 j 5 h
PR mergées (30 j)
8

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.