Skip to content

Commit 2fd2ab7

Browse files
committed
Use SIGINT only to catch Ctrl+C
1 parent 15c68ea commit 2fd2ab7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Lib/asyncio/runners.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,11 @@ def run(self, coro, *, context=None):
9797
context = self._context
9898
task = self._loop.create_task(coro, context=context)
9999

100-
if sys.platform == "win32":
101-
signum = signal.SIGBREAK
102-
else:
103-
signum = signal.SIGINT
100+
# if sys.platform == "win32":
101+
# signum = signal.SIGBREAK
102+
# else:
103+
# signum = signal.SIGINT
104+
signum = signal.SIGINT
104105
if (threading.current_thread() is threading.main_thread()
105106
and signal.getsignal(signum) is signal.default_int_handler
106107
):

0 commit comments

Comments
 (0)