Skip to content

Commit

Permalink
examples: close with Ctrl+C instead of SIGUSR1
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes committed Dec 18, 2024
1 parent e8c96cc commit c18538b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/start_stop_server/start_stop_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ static struct MavsdkServer* mavsdk_server;

void signal_handler(int sig)
{
std::cout << "Received SIGUSR1 signal" << std::endl;
std::cout << "Received signal " << sig << std::endl;

mavsdk_server_stop(mavsdk_server);
}
Expand All @@ -25,7 +25,7 @@ int main(int argc, char* argv[])
return 1;
}

signal(SIGUSR1, signal_handler);
signal(SIGINT, signal_handler);

mavsdk_server_init(&mavsdk_server);
mavsdk_server_run(mavsdk_server, argv[1], 50051);
Expand Down

0 comments on commit c18538b

Please sign in to comment.