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

Fix Positron stdout redirection after Ipykernel closes #1687

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

dfalbel
Copy link
Member

@dfalbel dfalbel commented Oct 23, 2024

IPykernel will create a thread that redirects all output from fileno of the current sys.stdout and sys.stderr to its IO channels. This is not correctly cleaned up when IPykernel closes. See https://github.com/ipython/ipykernel/blob/2ca799276f4458d50085bb1ef8e2ddeb08a283a6/ipykernel/iostream.py#L439-L444
To fix that, we set the IO streams to /dev/null before launching the kernel.

Adresses posit-dev/positron#5057

@t-kalinowski t-kalinowski merged commit 5834f6a into main Oct 23, 2024
16 checks passed
@t-kalinowski t-kalinowski deleted the bugfix/positron-io-reset branch October 23, 2024 15:55
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.

2 participants