fix it temporaary

This commit is contained in:
MihailRis 2026-10-12 18:16:34 +03:00
parent 2e7c6bca51
commit 083fc514d5
3 changed files with 6 additions and 2 deletions

View file

@ -1,7 +1,7 @@
#pragma once
#include <array>
#include <iostream>
#include <istream>
#include <streambuf>
#include <vector>

View file

@ -116,7 +116,10 @@ protected:
size_t remaining = size;
while (remaining > 0) {
const auto written = ::write(fd, ptr, remaining);
if (written <= 0) {
if (written < 0) {
if (errno == EINTR) {
continue;
}
return -1;
}
ptr += written;

View file

@ -33,6 +33,7 @@ int main(int argc, char** argv) {
std::cerr << err.what() << std::endl;
return EXIT_FAILURE;
}
std::signal(SIGPIPE, SIG_IGN);
std::signal(SIGTERM, sigterm_handler);
#ifdef NDEBUG
std::signal(SIGINT, sigterm_handler);