Skip to content

Commit 98a4323

Browse files
authored
Merge pull request #314 from minrk/process-groups
kill process group when killing kernel
2 parents 16d8122 + 22092fa commit 98a4323

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
@@ -372,7 +372,10 @@ def _kill_kernel(self):
372372
# Signal the kernel to terminate (sends SIGKILL on Unix and calls
373373
# TerminateProcess() on Win32).
374374
try:
375-
self.kernel.kill()
375+
if hasattr(signal, 'SIGKILL'):
376+
self.signal_kernel(signal.SIGKILL)
377+
else:
378+
self.kernel.kill()
376379
except OSError as e:
377380
# In Windows, we will get an Access Denied error if the process
378381
# has already terminated. Ignore it.

0 commit comments

Comments
 (0)