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
Closed

Conversation

@bagder
Copy link
Member

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.

@bagder bagder force-pushed the bagder/remake-EINTR branch from 1386607 to cd03a66 Jan 22, 2020
@noloader

This comment has been minimized.

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

This comment has been minimized.

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?

@bagder bagder force-pushed the bagder/remake-EINTR branch from cd03a66 to 6568f97 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.

- 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 force-pushed the bagder/remake-EINTR branch from 65e3a71 to 221decd Jan 24, 2020
@bagder bagder marked this pull request as ready for review Jan 24, 2020
@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 Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.