Skip to content

Commit b8d617e

Browse files
takluyverMeeseeksDev[bot]
authored andcommitted
Backport PR #314: kill process group when killing kernel
1 parent dfa190d commit b8d617e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jupyter_client/manager.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,10 @@ def _kill_kernel(self):
380380
# Signal the kernel to terminate (sends SIGKILL on Unix and calls
381381
# TerminateProcess() on Win32).
382382
try:
383-
self.kernel.kill()
383+
if hasattr(signal, 'SIGKILL'):
384+
self.signal_kernel(signal.SIGKILL)
385+
else:
386+
self.kernel.kill()
384387
except OSError as e:
385388
# In Windows, we will get an Access Denied error if the process
386389
# has already terminated. Ignore it.

0 commit comments

Comments
 (0)