Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions score/launch_manager/src/daemon/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ cc_binary(
"//score/launch_manager/src/daemon/src/process_group_manager:alive_monitor_thread",
"//score/launch_manager/src/daemon/src/process_state_client:process_state_notifier",
"//score/launch_manager/src/daemon/src/recovery_client",
"@score_baselibs//score/language/futurecpp",
] + select({
"//config:lm_use_new_configuration": [
"//score/launch_manager/src/daemon/src/configuration:flatbuffer_config_loader",
Expand Down
17 changes: 17 additions & 0 deletions score/launch_manager/src/daemon/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
#include <unistd.h>
#include <cstring>
#include <iostream>
#include <sstream>

#include <score/assert.hpp>

#include "score/mw/launch_manager/common/log.hpp"

Expand Down Expand Up @@ -158,6 +161,20 @@ int main(int argc, const char* argv[])
int main([[maybe_unused]] int argc, [[maybe_unused]] const char* argv[])
{
#endif
score::cpp::set_assertion_handler([](const score::cpp::handler_parameters& params) {
std::ostringstream msg;
msg << "Assertion failed: " << (params.condition != nullptr ? params.condition : "")
<< "\n Location: " << (params.file != nullptr ? params.file : "?") << ":" << params.line
<< " (" << (params.function != nullptr ? params.function : "?") << ")";
if (params.message != nullptr)
{
msg << "\n Message: " << params.message;
}
msg << "\n";
std::cerr << msg.str();
});


// reserve files descriptor osal::IpcCommsSync::sync_fd (fd3) and
// osal::IpcCommsSync::control_client_handler_nudge_fd (fd4) for communication tpyes: kNoComms !fd3 & !fd4
// kReporting fd3 & !fd4
Expand Down
Loading