Removed unrelated changes

This commit is contained in:
Alexey Milovidov 2019-12-22 23:19:29 +03:00
parent 9c868c910a
commit 48d126e88a
2 changed files with 1 additions and 12 deletions

View File

@ -236,9 +236,3 @@ std::optional<std::reference_wrapper<Daemon>> BaseDaemon::tryGetInstance()
else else
return {}; return {};
} }
/// If you send TSTP signal with value (sigqueue) to a thread, it will make a callback
/// from a separate thread and you can call non signal-safe function from there.
using SignalCallback = void(const siginfo_t &, const StackTrace &, UInt32);

View File

@ -70,12 +70,7 @@ static void call_default_signal_handler(int sig)
} }
/// Normally query_id is a UUID (string with a fixed length) but user can provide custom query_id. static const size_t buf_size = sizeof(int) + sizeof(siginfo_t) + sizeof(ucontext_t) + sizeof(StackTrace) + sizeof(UInt32);
/// Thus upper bound on query_id length should be introduced to avoid buffer overflow in signal handler.
constexpr size_t QUERY_ID_MAX_LEN = 1024;
static const size_t buf_size = sizeof(int) + sizeof(siginfo_t) + sizeof(ucontext_t) + sizeof(StackTrace) + sizeof(UInt32)
+ QUERY_ID_MAX_LEN + 2 /* varint encoding query_id length */;
using signal_function = void(int, siginfo_t*, void*); using signal_function = void(int, siginfo_t*, void*);