Skip to content
Open
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 @@ -28,5 +28,6 @@ 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",
],
)
13 changes: 13 additions & 0 deletions score/launch_manager/src/daemon/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include <cstring>
#include <iostream>

#include <score/assert.hpp>

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

#include "score/mw/launch_manager/process_group_manager/alive_monitor_thread.hpp"
Expand Down Expand Up @@ -106,6 +108,17 @@ void reserveFD(int fd)
// coverity[autosar_cpp14_a15_3_3_violation:FALSE] Only logging occurs outside the try-catch enclosing main().
int main([[maybe_unused]] int argc, [[maybe_unused]] const char* argv[])
{
score::cpp::set_assertion_handler([](const score::cpp::handler_parameters& params) {
std::cerr << "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)
{
std::cerr << "\n Message: " << params.message;
}
std::cerr << "\n";
});

// 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