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

global_init: assume the EINTR bit by default #4840

Closed
wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Jan 22, 2020

  • Removed from global_init since it isn't thread-safe. The symbol will still remain to not break compiles, it just won't have any effect going forward.

  • make the internals NOT loop on EINTR (the opposite from previously). It only risks returning from the select/poll/wait functions early, and that should be risk-free.

Brought to the mailing list with no objections following.

@noloader
Copy link

noloader commented Jan 23, 2020

Removed from global_init since it isn't thread-safe. The symbol will still
remain to not break compiles, it just won't have any effect going forward.

This may cause some pain points for some distros. I think distros expect EINTR will break the wait.

See, for example, Fedora Issue 919127, Provide a CURL_GLOBAL_ACK_EINTR flag to curl_global_init().

@bagder
Copy link
Member Author

bagder commented Jan 23, 2020

This change changes the default to not retrying on EINTR, which is exactly what that Fedora issue wanted...

So the question is if there's anything that would be affected or even notice if those functions return earlier when aborted by a signal?

- Removed from global_init since it isn't thread-safe. The symbol will
  still remain to not break compiles, it just won't have any effect going
  forward.

- make the internals NOT loop on EINTR (the opposite from previously).
  It only risks returning from the select/poll/wait functions early, and that
  should be risk-free.

Closes #4840
@bagder bagder marked this pull request as ready for review January 24, 2020 14:02
@bagder bagder changed the title [WIP] global_init: remove the global EINTR handling global_init: assume the EINTR bit by default Jan 24, 2020
@bagder bagder closed this in 1ad49fe Jan 26, 2020
@bagder bagder deleted the bagder/remake-EINTR branch January 26, 2020 17:28
@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

None yet

2 participants