This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sovetov
Recipients sovetov
Date 2021-03-16.21:48:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615931330.13.0.919468061035.issue43523@roundup.psfhosted.org>
In-reply-to
Content
Ctrl+C alone has no effect, but Ctrl+Break works:
```
winrs -r:127.0.0.1:20465 -u:Administrator -p:qweasd123 python -c "import sys;sys.stdin.read(1)"
```
Although, if I press Ctrl+C, type zero or more symbols and then press Enter, KeyboardInterrupt is raised:
```
lalala
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Program Files\Python39\lib\encodings\cp1252.py", line 22, in decode
    def decode(self, input, final=False):
KeyboardInterrupt
^C^C
```

With the following commands, both Ctrl+C and Ctrl+Break work:
```
winrs -r:127.0.0.1:20465 -u:Administrator -p:qweasd123 python -c "import time;time.sleep(10)"
"c:\Program Files\Python39\python.exe" -c "import sys; sys.stdin.read(1)"
"c:\Program Files\Python39\python.exe" -c "import time;time.sleep(10)"
```

I faced this issue when working with WSMV (Windows remoting API) directly, but I reproduced this with winrs to make sure it's not a bug in my code. I send the Ctrl+C signal, got a no-error response, then poll the running command. It behaves as if a signal had no effect.
History
Date User Action Args
2021-03-16 21:48:50sovetovsetrecipients: + sovetov
2021-03-16 21:48:50sovetovsetmessageid: <1615931330.13.0.919468061035.issue43523@roundup.psfhosted.org>
2021-03-16 21:48:50sovetovlinkissue43523 messages
2021-03-16 21:48:50sovetovcreate