Ignore return value of write() in signal handler

pull/626/head
Nicolas Werner 3 years ago
parent e5776f7177
commit 66e69d7f2b
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 4
      src/main.cpp

@ -76,8 +76,8 @@ stacktraceHandler(int signum)
#endif
);
if (file != -1) {
constexpr char header[] = "Error: signal\n";
write(file, header, std::size(header) - 1);
constexpr char header[] = "Error: signal\n";
[[maybe_unused]] auto ret = write(file, header, std::size(header) - 1);
backtrace_symbols_fd(array, size, file);
close(file);
}

Loading…
Cancel
Save