-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure that the debugger is cleared after fork in non-python proce…
…ss. Fixes #1005
- Loading branch information
Showing
3 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/debugpy/_vendored/pydevd/tests_python/resources/_debugger_case_gevent_subprocess.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from gevent import monkey | ||
monkey.patch_all() | ||
|
||
import subprocess | ||
import sys | ||
import os | ||
|
||
if __name__ == "__main__": | ||
if '-foo' in sys.argv: | ||
print('foo called') | ||
else: | ||
if os.environ.get('CALL_PYTHON_SUB') == '1': | ||
assert 'foo called' in subprocess.check_output([sys.executable, __file__, '-foo']).decode('utf-8') | ||
else: | ||
subprocess.check_output("tput -T xterm-256color bold".split()) | ||
print('TEST SUCEEDED') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters