What is the reason for handling interrupted system calls (EINTR) throughout the code?

Open
#69 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Read the socket-function and select call sites in the single-header C++ HTTP request class, then trace how EINTR is handled around them. Done means explaining the reason for these checks and documenting whether the current handling is necessary.

Written by the indexing model from the issue text.

Description

I noticed that you are checking for EINTR across all socket functions. Can you explain why? As far as I understand, in order for a system call to be interrupted, the following conditions must be met:

  • The process must be blocked by a system call (which only occurs in select since you are using a non-blocking socket).
  • The process must be catching signals, but the code does not catch any signals.
Dominant language
C++
Stars
969
Forks
200
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from elnormous/HTTPRequest

All issues in elnormous/HTTPRequest

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.