Skip to content

Commit 933a9d7

Browse files
yihong0618picnixz
andauthored
Apply suggestions from code review
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent bcd67d3 commit 933a9d7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Lib/_pyrepl/unix_console.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ def restore(self):
397397
# We can silence the ValueError if signal.signal() raised it
398398
# from a non-main thread on a non-Windows platform. Otherwise,
399399
# we need to re-raise it as its cause could be different.
400+
import threading
400401
if threading.current_thread() is threading.main_thread():
401402
raise e
402403
del self.old_sigwinch
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
Fix crash in PyREPL asyncio mode when using Ctrl+Z (suspend) followed by
2-
``fg`` (resume).
1+
Fix an issue when, on non-Windows platforms, it was not possible to
2+
gracefully exit a ``python -m asyncio`` process suspended by Ctrl+Z
3+
and later resumed by :manpage:`fg` other than with :manpage:`kill`.

0 commit comments

Comments
 (0)