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

Clean up both wakeup_fds #171

Closed
wants to merge 1 commit into from
Closed

Clean up both wakeup_fds #171

wants to merge 1 commit into from

Conversation

thomasballinger
Copy link
Member

I'm not sure this is covering everything yet, but it fixes the cleanup problem.

Careful, this test doesn't run in CI right now, use pytest -s --doctest-modules ./curtsies ./tests to run all tests locally.

Fixes #170

@@ -135,7 +137,12 @@ def __exit__(
):
signal.signal(signal.SIGINT, self.orig_sigint_handler)
if sys.version_info[0] == 3 and sys.version_info[1] > 4:
signal.set_wakeup_fd(-1)
if threading.current_thread() is threading.main_thread():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is is_main_thread in the same file.

@sebastinas
Copy link
Contributor

Rebased and merged.

@sebastinas sebastinas closed this May 4, 2022
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

Successfully merging this pull request may close these issues.

Pipe file descriptors are not closed when using Input with with statement
2 participants