Skip to content

[ML] Only log failure to ignore SIGPIPE once #1221

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

Merged
merged 1 commit into from
May 11, 2020

Conversation

droberts195
Copy link
Contributor

The warning if something stops SIGPIPE being ignored has
always been deferred as the signal calls are made before
main() has run. However, the place the warning was deferred
to could result in it being logged many times because the
deferred logging was in a method that could be called many
times.

This change moves that deferred logging to a dedicated
method that can just be called once.

The warning if something stops SIGPIPE being ignored has
always been deferred as the signal calls are made before
main() has run.  However, the place the warning was deferred
to could result in it being logged many times because the
deferred logging was in a method that could be called many
times.

This change moves that deferred logging to a dedicated
method that can just be called once.
@droberts195
Copy link
Contributor Author

I labelled this >non-issue as it's so inconsequential and there's no evidence anyone has ever suffered as a result. But if people disagree I can relabel it as a >bug.

Copy link
Contributor

@tveasey tveasey left a comment

Choose a reason for hiding this comment

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

LGTM

@droberts195 droberts195 merged commit d5ff630 into elastic:master May 11, 2020
@droberts195 droberts195 deleted the deferred_sigpipe_error branch May 11, 2020 21:00
droberts195 added a commit to droberts195/ml-cpp that referenced this pull request May 12, 2020
The warning if something stops SIGPIPE being ignored has
always been deferred as the signal calls are made before
main() has run.  However, the place the warning was deferred
to could result in it being logged many times because the
deferred logging was in a method that could be called many
times.

This change moves that deferred logging to a dedicated
method that can just be called once.

Backport of elastic#1221
droberts195 added a commit to droberts195/ml-cpp that referenced this pull request May 12, 2020
The warning if something stops SIGPIPE being ignored has
always been deferred as the signal calls are made before
main() has run.  However, the place the warning was deferred
to could result in it being logged many times because the
deferred logging was in a method that could be called many
times.

This change moves that deferred logging to a dedicated
method that can just be called once.

Backport of elastic#1221
droberts195 added a commit that referenced this pull request May 12, 2020
The warning if something stops SIGPIPE being ignored has
always been deferred as the signal calls are made before
main() has run.  However, the place the warning was deferred
to could result in it being logged many times because the
deferred logging was in a method that could be called many
times.

This change moves that deferred logging to a dedicated
method that can just be called once.

Backport of #1221
droberts195 added a commit that referenced this pull request May 12, 2020
The warning if something stops SIGPIPE being ignored has
always been deferred as the signal calls are made before
main() has run.  However, the place the warning was deferred
to could result in it being logged many times because the
deferred logging was in a method that could be called many
times.

This change moves that deferred logging to a dedicated
method that can just be called once.

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

Successfully merging this pull request may close these issues.

2 participants