1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:27:35 +00:00

RequestServer: Don't hide the SIGINFO state dump behind a debug macro

Until we're confident that RequestServer doesn't need this runtime debug
dump helper, it's much nicer if everyone has it built in, so they can
simply send a SIGINFO if they see it acting up.
This commit is contained in:
Andreas Kling 2021-10-01 19:59:51 +02:00
parent 3db847c64a
commit 77f0e57b27
5 changed files with 10 additions and 31 deletions

View file

@ -17,20 +17,13 @@
int main(int, char**)
{
if constexpr (REQUEST_SERVER_DEBUG) {
if (pledge("stdio inet accept unix rpath sendfd recvfd sigaction", nullptr) < 0) {
perror("pledge");
return 1;
}
signal(SIGINFO, [](int) { RequestServer::ConnectionCache::dump_jobs(); });
} else {
if (pledge("stdio inet accept unix rpath sendfd recvfd", nullptr) < 0) {
perror("pledge");
return 1;
}
if (pledge("stdio inet accept unix rpath sendfd recvfd sigaction", nullptr) < 0) {
perror("pledge");
return 1;
}
signal(SIGINFO, [](int) { RequestServer::ConnectionCache::dump_jobs(); });
// Ensure the certificates are read out here.
[[maybe_unused]] auto& certs = DefaultRootCACertificates::the();