Skip to content
This repository was archived by the owner on Apr 29, 2026. It is now read-only.

Commit 4ba61b2

Browse files
maxnordlundsebastinas
authored andcommitted
Comment what is turned off
This adds an extra comment explaining what is turned off when the signal handlers are ignored.
1 parent 51d208e commit 4ba61b2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

bpython/curtsiesfrontend/repl.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,8 @@ def __enter__(self):
536536
signal.signal(signal.SIGWINCH, self.sigwinch_handler)
537537
signal.signal(signal.SIGTSTP, self.sigtstp_handler)
538538
except ValueError:
539-
pass # Ignore "signal only works in main thread"
539+
pass # Ignore "signal only works in main thread"
540+
# This turns off resize detection and ctrl-z suspension.
540541

541542
self.orig_meta_path = sys.meta_path
542543
if self.watcher:
@@ -554,7 +555,8 @@ def __exit__(self, *args):
554555
signal.signal(signal.SIGWINCH, self.orig_sigwinch_handler)
555556
signal.signal(signal.SIGTSTP, self.orig_sigtstp_handler)
556557
except ValueError:
557-
pass # Ignore "signal only works in main thread"
558+
pass # Ignore "signal only works in main thread"
559+
# This turns off resize detection and ctrl-z suspension.
558560

559561
sys.meta_path = self.orig_meta_path
560562

0 commit comments

Comments
 (0)