Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interop with Python breaks CTRL+C #555

Open
Tenchi2xh opened this issue Apr 29, 2024 · 1 comment
Open

Interop with Python breaks CTRL+C #555

Tenchi2xh opened this issue Apr 29, 2024 · 1 comment

Comments

@Tenchi2xh
Copy link

Tenchi2xh commented Apr 29, 2024

Running the following code in Codon and interrupting it with CTRL + C works as expected:

import time

print("ready")
while True:
    time.sleep(0.1)
$ codon run test.py
ready
^C
$

However, adding any type of Python interop will disable breaking and will need killing the process to end it:

import time
from python import PIL

print("ready")
while True:
    time.sleep(0.1)
$ codon run test.py
ready
^C^C^C^C^C^C^C^CKilled: 9
$

Also works with a @python decorator:

import time

@python
def foo():
    pass

print("ready")
while True:
    time.sleep(0.1)
$ codon run test.py
ready
^C^C^C^C^C^C^C^CKilled: 9
$
@arshajii
Copy link
Contributor

arshajii commented May 4, 2024

Thanks for the report -- I'm able to reproduce the issue. Going to investigate further... I wonder if libpython is somehow catching the interrupt signal and causing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants