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

nft-helper: Terminate on errors #18

Merged
merged 1 commit into from
Dec 18, 2024
Merged

nft-helper: Terminate on errors #18

merged 1 commit into from
Dec 18, 2024

Conversation

wkz
Copy link
Contributor

@wkz wkz commented Dec 18, 2024

  • Fix the error detection with waitpid(), which returns the PID of the waited process, so run() thus always used to return -1.

  • Return the full wait status info so we can write a better error message about what happened, to the user.

  • Terminate the program if the ruleset fails to load.

  • Write an informational message when the ruleset is successfully applied, so that the user can be sure that it has loaded properly.

Fix #17

- Fix the error detection with `waitpid()`, which returns the PID of
  the waited process, so `run()` thus always used to return -1.

- Return the full wait status info so we can write a better error
  message about what happened, to the user.

- Terminate the program if the ruleset fails to load.

- Write an informational message when the ruleset is successfully
  applied, so that the user can be sure that it has loaded properly.

Fix #17
@wkz wkz requested a review from troglobit December 18, 2024 15:52
@troglobit troglobit merged commit e35d3b5 into main Dec 18, 2024
12 checks passed
@troglobit troglobit deleted the nft-helper-fixes branch December 18, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nft-helper should terminate if the ruleset can not be applied
2 participants