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

Make sure SIGPIPE has default handler set #91

Merged
merged 2 commits into from
Mar 15, 2021
Merged

Conversation

dlukes
Copy link
Contributor

@dlukes dlukes commented Mar 12, 2021

When spawning individual servers in a way that has systemd as an ancestor somewhere up the process tree (e.g. using SystemdSpawner), the server inherits systemd's default of ignoring SIGPIPE. This in turn means that if you start a terminal inside the individual server and run pipelines, you can come across Broken pipe errors which you wouldn't normally see in an interactive shell that has default SIGPIPE handling:

user@host:~/ls20-21$ yes | head
y
y
y
y
y
y
y
y
y
y
yes: standard output: Broken pipe

(See this post on the Jupyter Discourse for more details.)

The systemd-devel mailing list post linked in the first paragraph suggests that "Of course, shells and suchlike should turn this [i.e. SIGPIPE handling] on again." So this is what this PR does :) Let me know though if this should be handled somewhere else, I'm keen to follow through and do everything I can to have this fixed, as it affects my own setup and teaching.

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

Thanks!

@blink1073 blink1073 merged commit 5b47db5 into jupyter:master Mar 15, 2021
@blink1073
Copy link
Contributor

https://pypi.org/project/terminado/0.9.3/

@meeseeksmachine
Copy link

This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there:

https://discourse.jupyter.org/t/unexpected-broken-pipe-errors-in-the-jupyterlab-terminal/8297/6

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.

3 participants