Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
int19h committed Aug 7, 2020
1 parent 76c5549 commit dfbc7f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/debugpy/launcher/autokill.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# {"subProcess": false} or {"noDebug": true} doesn't track subprocesses at all,
# but the code here ensures that all those subprocesses are cleaned up anyway.

import atexit
import os
import signal
import sys
Expand All @@ -22,7 +23,7 @@ def _enable_posix():
# unless they opt out) to a new process group, and kill the entire group on exit.
pid = os.getpid()
os.setpgid(pid, 0)
sys.atexit(lambda: os.kill(-pid, signal.SIGKILL))
atexit.register(lambda: os.kill(-pid, signal.SIGKILL))


def _enable_win32():
Expand Down

0 comments on commit dfbc7f9

Please sign in to comment.