Skip to content

Commit

Permalink
Include variety of terminate process signals handler in discovery ser…
Browse files Browse the repository at this point in the history
…ver (#4278) (#4332)

* Refs #19587: Include SIGHUP handler

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #19587: Handle more signals

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #19587: Move proper signals to 'linux only' case

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #19587: Apply Miguel suggestion

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #19587: Fix Windows build

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

---------

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
(cherry picked from commit 6eb1170)

Co-authored-by: Jesús Poderoso <120394830+JesusPoderoso@users.noreply.github.com>
  • Loading branch information
mergify[bot] and JesusPoderoso authored Feb 15, 2024
1 parent ee0565b commit 2f9f6ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/fds/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,10 @@ int fastdds_discovery_server(
// Handle signal SIGINT for every thread
signal(SIGINT, sigint_handler);
signal(SIGTERM, sigint_handler);
#ifndef _WIN32
signal(SIGQUIT, sigint_handler);
signal(SIGHUP, sigint_handler);
#endif // ifndef _WIN32

bool has_security = false;
if (guid_prefix != pServer->guid().guidPrefix)
Expand Down

0 comments on commit 2f9f6ca

Please sign in to comment.