Skip to content

Commit

Permalink
signal removed from mains
Browse files Browse the repository at this point in the history
  • Loading branch information
mgonzs13 committed Oct 31, 2024
1 parent fff2488 commit 972d36f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
13 changes: 0 additions & 13 deletions llama_ros/src/llama_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,15 @@
// SOFTWARE.

#include <memory>
#include <signal.h>
#include <vector>

#include "llama_ros/llama_node.hpp"
#include "rclcpp/rclcpp.hpp"

using namespace llama_ros;

void sigint_handler(int signo) {
if (signo == SIGINT) {
rclcpp::shutdown();
}
}

int main(int argc, char *argv[]) {

struct sigaction sigint_action;
sigint_action.sa_handler = sigint_handler;
sigemptyset(&sigint_action.sa_mask);
sigint_action.sa_flags = 0;
sigaction(SIGINT, &sigint_action, NULL);

rclcpp::init(argc, argv);

auto node = std::make_shared<LlamaNode>();
Expand Down
13 changes: 0 additions & 13 deletions llama_ros/src/llava_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,15 @@
// SOFTWARE.

#include <memory>
#include <signal.h>
#include <vector>

#include "llava_ros/llava_node.hpp"
#include "rclcpp/rclcpp.hpp"

using namespace llava_ros;

void sigint_handler(int signo) {
if (signo == SIGINT) {
rclcpp::shutdown();
}
}

int main(int argc, char *argv[]) {

struct sigaction sigint_action;
sigint_action.sa_handler = sigint_handler;
sigemptyset(&sigint_action.sa_mask);
sigint_action.sa_flags = 0;
sigaction(SIGINT, &sigint_action, NULL);

rclcpp::init(argc, argv);

auto node = std::make_shared<LlavaNode>();
Expand Down

0 comments on commit 972d36f

Please sign in to comment.