microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.35k stars 815 forks source link

Unable to catch keyboard interrupts. #1922

Closed ghost closed 4 years ago

ghost commented 7 years ago

When running a python script on wsl, I'm unable to forward keyboard interrupts, the same script works well in the IDLE IDE , native ubuntu etc. It shows ^C , but somehow python ignores this.

aseering commented 7 years ago

Hi @somu1795 -- could you please fill out the issue template? Perhaps the WSL team has a guess, but without knowing precisely how your code is trying to forward ctrl-C (which is what the template is helping to teach you to establish), I'm left saying "works for me!" :-)

ghost commented 7 years ago

Actually after trying several other scripts, ctrl+C is being forwarded correctly , but in this particular script it isn't working in wsl.

Script - https://github.com/somu1795/netwave_ip_camera_vulnerability/blob/master/netwave_leak.py

Screenshots - https://ibb.co/gUS0Ak
https://ibb.co/jnZ2O5
https://ibb.co/g74QbQ (Here interrupt works as expected)

fpqc commented 7 years ago

you didnt say what winversion

ghost commented 7 years ago

Mine is latest CU update, winver - 15063.138

therealkenc commented 4 years ago

This one went chirping crickets because there weren't repro steps (f.e. sudo apt install python-shodan) to run the linked script, plus the LGTM on except KeyboardInterrupt:. Could in the hypothetical be re-filed if the problem (such that it was) persists.