Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[19587] Include variety of terminate proccess signals handler in discovery server #4278

Merged
merged 5 commits into from
Jan 30, 2024

Conversation

JesusPoderoso
Copy link
Contributor

@JesusPoderoso JesusPoderoso commented Jan 23, 2024

Description

While closing the terminal by clicking the X button, it seems that the signal emitted was SIGHUP.
For that reason, by handling that signal the application properly closes in those scenarios.

It may be interesting to handle this signal also in several eProsima products. What do you think about the following list, @Mario-DL?
Fast DDS CLI, Fast DDS pipe, router, monitor, record, replay, spy.

EDIT:
After research , I've included the following signals to handle as terminate:

  1. SIGQUIT: Quit signal. Similar to SIGINT, but also produces a core dump of the process.

@Mergifyio backport 2.12.x 2.11.x 2.10.x 2.6.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • N/A Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • N/A Any new/modified methods have been properly documented using Doxygen.
  • Changes are ABI compatible.
  • Changes are API compatible.
  • N/A New feature has been added to the versions.md file (if applicable).
  • N/A New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
@JesusPoderoso JesusPoderoso added the no-test Skip CI tests if PR marked with this label label Jan 23, 2024
@JesusPoderoso JesusPoderoso added this to the v2.13.2 milestone Jan 23, 2024
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
@Mario-DL
Copy link
Member

@richiprosima please test this

Mario-DL
Mario-DL previously approved these changes Jan 25, 2024
Copy link
Member

@Mario-DL Mario-DL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting signal additions. LGTM with Green CI.
The list is Ok to me. SIGKILL and SIGSTOP cannot be handled.
Checked that it solves the issue of an unhandled signal

@Mario-DL
Copy link
Member

Friendly pinging @rsanchez15 as it could be interesting to handle these signals in other executables or products too.

@Mario-DL
Copy link
Member

@JesusPoderoso NIT
Please, update the PR's title since SIGHUP is not going to be the only signal handled in this PR.

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
@JesusPoderoso JesusPoderoso changed the title [19587] Include SIGHUP handler in discovery server [19587] Include variety of terminate proccess signals handler in discovery server Jan 25, 2024
Mario-DL
Mario-DL previously approved these changes Jan 25, 2024
Copy link
Member

@Mario-DL Mario-DL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with Green CI. Checking that the CI is compiling its important since some signals may not be available in all OSs.

@Mario-DL
Copy link
Member

@richiprosima please test this

tools/fds/server.cpp Outdated Show resolved Hide resolved
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
@JesusPoderoso
Copy link
Contributor Author

@richiprosima please test this

MiguelCompany
MiguelCompany previously approved these changes Jan 25, 2024
@JesusPoderoso
Copy link
Contributor Author

@richiprosima please test windows

@Mario-DL
Copy link
Member

@JesusPoderoso please include the backports in the description

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
@JesusPoderoso
Copy link
Contributor Author

It seems that SIGQUIT is also NOT supported in Windows @Mario-DL @MiguelCompany

@JesusPoderoso
Copy link
Contributor Author

@Mergifyio backport 2.12.x 2.11.x 2.10.x 2.6.x

Copy link
Contributor

mergify bot commented Jan 26, 2024

@JesusPoderoso
Copy link
Contributor Author

@richiprosima please test this

@JesusPoderoso
Copy link
Contributor Author

@richiprosima please test mac

@JesusPoderoso JesusPoderoso added the ci-pending PR which CI is running label Jan 29, 2024
@JesusPoderoso
Copy link
Contributor Author

@richiprosima please test mac

@JesusPoderoso
Copy link
Contributor Author

@richiprosima please test mac

2 similar comments
@JesusPoderoso
Copy link
Contributor Author

@richiprosima please test mac

@JesusPoderoso
Copy link
Contributor Author

@richiprosima please test mac

@JesusPoderoso
Copy link
Contributor Author

@richiprosima please test mac 🥲

@JesusPoderoso
Copy link
Contributor Author

@richiprosima please test mac 😢

@JesusPoderoso JesusPoderoso added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed no-test Skip CI tests if PR marked with this label ci-pending PR which CI is running labels Jan 30, 2024
@JesusPoderoso JesusPoderoso merged commit 6eb1170 into master Jan 30, 2024
14 checks passed
@JesusPoderoso JesusPoderoso deleted the hotfix/19587 branch January 30, 2024 14:59
mergify bot pushed a commit that referenced this pull request Jan 30, 2024
…rver (#4278)

* 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)
mergify bot pushed a commit that referenced this pull request Jan 30, 2024
…rver (#4278)

* 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)
mergify bot pushed a commit that referenced this pull request Jan 30, 2024
…rver (#4278)

* 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)
mergify bot pushed a commit that referenced this pull request Jan 30, 2024
…rver (#4278)

* 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)
MiguelCompany pushed a commit that referenced this pull request Feb 14, 2024
…rver (#4278)

* 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)
EduPonz pushed a commit that referenced this pull request Feb 15, 2024
…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>
MiguelCompany pushed a commit that referenced this pull request Feb 21, 2024
…rver (#4278) (#4333)

* 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>
elianalf pushed a commit that referenced this pull request Feb 29, 2024
…rver (#4278) (#4331)

* 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>
EduPonz pushed a commit that referenced this pull request Mar 7, 2024
…rver (#4278) (#4334)

* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants