fix: add missing #include <csignal> in coro_io.hpp#1152
Merged
poor-circle merged 1 commit intoalibaba:mainfrom Mar 4, 2026
Merged
fix: add missing #include <csignal> in coro_io.hpp#1152poor-circle merged 1 commit intoalibaba:mainfrom
poor-circle merged 1 commit intoalibaba:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds the missing standard header needed for the Linux-only SIGPIPE ignore handler in coro_io.hpp, preventing build failures when <csignal> is not transitively included by other headers.
Changes:
- Include
<csignal>ininclude/ylt/coro_io/coro_io.hppto supportstd::signal,SIGPIPE, andSIG_IGNusage under#ifdef __linux__.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
for detail, goto summary download Artifacts |
Collaborator
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
coro_io.hpp uses std::signal(), SIGPIPE and SIG_IGN (line 769, inside #ifdef linux) but does not include . When no other transitively-included header happens to bring in , compilation fails.
This was discovered while building other library which depends on yalantinglibs. The full error log:
The pipe_signal_handler lambda inside #ifdef linux calls std::signal(SIGPIPE, SIG_IGN), which requires . Previously this worked by accident because some other header in the include chain transitively pulled in . When the downstream project's include order differs, this implicit dependency breaks.
What is changing
Add #include to coro_io.hpp.