callback for running the script in the background
(self, p, cell, to_close)
| 350 | shebang.__skip_doctest__ = os.name != "posix" |
| 351 | |
| 352 | async def _run_script(self, p, cell, to_close): |
| 353 | """callback for running the script in the background""" |
| 354 | |
| 355 | p.stdin.write(cell) |
| 356 | await p.stdin.drain() |
| 357 | p.stdin.close() |
| 358 | await p.stdin.wait_closed() |
| 359 | await p.wait() |
| 360 | # asyncio read pipes have no close |
| 361 | # but we should drain the data anyway |
| 362 | for s in to_close: |
| 363 | await s.read() |
| 364 | self._gc_bg_processes() |
| 365 | |
| 366 | @line_magic("killbgscripts") |
| 367 | def killbgscripts(self, _nouse_=''): |
no test coverage detected