Show More
@@ -18,6 +18,7 b' import sys' | |||||
18 | import signal |
|
18 | import signal | |
19 | import time |
|
19 | import time | |
20 | from subprocess import Popen, PIPE |
|
20 | from subprocess import Popen, PIPE | |
|
21 | import atexit | |||
21 |
|
22 | |||
22 | # Our own packages |
|
23 | # Our own packages | |
23 | from IPython.config.configurable import Configurable |
|
24 | from IPython.config.configurable import Configurable | |
@@ -135,6 +136,7 b' class ScriptMagics(Magics, Configurable):' | |||||
135 | Magics.__init__(self, shell=shell) |
|
136 | Magics.__init__(self, shell=shell) | |
136 | self.job_manager = BackgroundJobManager() |
|
137 | self.job_manager = BackgroundJobManager() | |
137 | self.bg_processes = [] |
|
138 | self.bg_processes = [] | |
|
139 | atexit.register(self.kill_bg_processes) | |||
138 |
|
140 | |||
139 | def __del__(self): |
|
141 | def __del__(self): | |
140 | self.kill_bg_processes() |
|
142 | self.kill_bg_processes() |
General Comments 0
You need to be logged in to leave comments.
Login now