Skip to content

Commit

Permalink
You are being far too difficult
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston committed Aug 9, 2024
1 parent f34beb1 commit 1ac8c03
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tests/networktest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,9 @@ class TestReactor : public NUClear::Reactor {
};
} // namespace

extern "C" {
void sigint_handler(int /*signal*/) {
NUClear::PowerPlant::powerplant->shutdown();
}
}

// NOLINTNEXTLINE(bugprone-exception-escape)
int main(int argc, const char* argv[]) {
auto old_sigint = signal(SIGINT, sigint_handler);
auto old_sigint = signal(SIGINT, [](int) { NUClear::PowerPlant::powerplant->shutdown(); });
if (old_sigint == SIG_ERR) {
std::cerr << "Failed to set SIGINT handler";
return -1;
Expand Down

0 comments on commit 1ac8c03

Please sign in to comment.