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

catch SIGPIPE #357

Open
11419191 opened this issue Jul 8, 2021 · 5 comments
Open

catch SIGPIPE #357

11419191 opened this issue Jul 8, 2021 · 5 comments

Comments

@11419191
Copy link

11419191 commented Jul 8, 2021

SSL_shutdown() tries to send the close_notify shutdown alert to the peer. When the peer has shutdown, kernel will send a SIGPIPE to client, so we must catch the signal.

@ismaell ismaell self-assigned this Jul 12, 2021
@ismaell ismaell added this to the v2.17.11 milestone Jul 12, 2021
@ismaell ismaell modified the milestones: v2.17.11, v2.17.12 Dec 12, 2021
@anindyasen
Copy link

Hi @ismaell

  1. Will the kernel always send SIGPIPE to the client on SSL_shutdown() or in some special scenario?
  2. What will be the action on catching that signal?
  3. How this scenario can be reproduced for testing purpose?
    Thanks

@ismaell
Copy link
Member

ismaell commented Oct 22, 2022

  1. SIGPIPE is received when the program tries to write to a closed connection.
  2. The signal can be blocked.
  3. You can implement a simple server that closes the connection immediately after accepting, that should cause the behaviour.

@ismaell ismaell modified the milestones: v2.17.12, v2.17.13, v2.17.14 Feb 6, 2024
@ismaell ismaell modified the milestones: v2.17.14, v2.17.15 Apr 12, 2024
@satk0
Copy link

satk0 commented Sep 3, 2024

Hi @ismaell may I try to tackle this issue?

@ismaell
Copy link
Member

ismaell commented Sep 4, 2024

Sure.

@satk0
Copy link

satk0 commented Sep 17, 2024

Hey @ismaell sorry for being idle for 2 weeks, but I was having a bad time building the axel project. It couldn't be built rn because of the zh_TW.po formatting issue:
image

Yet, I managed to solve it, check my PR: #447 😅

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

No branches or pull requests

4 participants