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

Main thread recognition broken when embedding #2564

Open
smurfix opened this issue Feb 8, 2023 · 0 comments
Open

Main thread recognition broken when embedding #2564

smurfix opened this issue Feb 8, 2023 · 0 comments
Labels

Comments

@smurfix
Copy link
Contributor

smurfix commented Feb 8, 2023

Trying to use Trio in a Python installation that already has installed a C level SIGINT handler fails.

        File "/usr/lib/python3/dist-packages/trio/_util.py", line 79, in is_main_thread
          signal.signal(signal.SIGINT, signal.getsignal(signal.SIGINT))
        File "/usr/lib/python3.11/signal.py", line 56, in signal
          handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object
@Zac-HD Zac-HD added the threads label Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants