Skip to content

Commit

Permalink
Merge pull request #314 from minrk/process-groups
Browse files Browse the repository at this point in the history
kill process group when killing kernel
  • Loading branch information
takluyver committed Dec 15, 2017
2 parents 16d8122 + 22092fa commit 98a4323
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jupyter_client/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,10 @@ def _kill_kernel(self):
# Signal the kernel to terminate (sends SIGKILL on Unix and calls
# TerminateProcess() on Win32).
try:
self.kernel.kill()
if hasattr(signal, 'SIGKILL'):
self.signal_kernel(signal.SIGKILL)
else:
self.kernel.kill()
except OSError as e:
# In Windows, we will get an Access Denied error if the process
# has already terminated. Ignore it.
Expand Down

0 comments on commit 98a4323

Please sign in to comment.