mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-22 18:39:46 +00:00
fix it temporaary
This commit is contained in:
parent
2e7c6bca51
commit
083fc514d5
3 changed files with 6 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <iostream>
|
#include <istream>
|
||||||
#include <streambuf>
|
#include <streambuf>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,10 @@ protected:
|
||||||
size_t remaining = size;
|
size_t remaining = size;
|
||||||
while (remaining > 0) {
|
while (remaining > 0) {
|
||||||
const auto written = ::write(fd, ptr, remaining);
|
const auto written = ::write(fd, ptr, remaining);
|
||||||
if (written <= 0) {
|
if (written < 0) {
|
||||||
|
if (errno == EINTR) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
ptr += written;
|
ptr += written;
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ int main(int argc, char** argv) {
|
||||||
std::cerr << err.what() << std::endl;
|
std::cerr << err.what() << std::endl;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
std::signal(SIGPIPE, SIG_IGN);
|
||||||
std::signal(SIGTERM, sigterm_handler);
|
std::signal(SIGTERM, sigterm_handler);
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
std::signal(SIGINT, sigterm_handler);
|
std::signal(SIGINT, sigterm_handler);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue