Skip to content

Protect instance signaling and container restarts - #1179

Merged
matteius merged 4 commits into
mainfrom
ai-findings-autofix/src-core-main.c
Nov 26, 2026
Merged

matteius merged 4 commits into
mainfrom
ai-findings-autofix/src-core-main.c

Conversation

@matteius

@matteius matteius commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Findings addressed

  • Prefer pidfd signals when replacing a previous instance, with a verified identity check before sending SIGTERM. Keep a syscall fallback for older kernels and preserve signal errors for logging.
  • Use interruptible nanosleep correctly during watchdog restart recovery.
  • Return a dedicated nonzero restart code in container mode so failure-based restart policies can restart the service.

Verification

Built lightnvr and test_config; all 80 config tests passed on this branch.

matteius and others added 3 commits November 26, 2026 02:48
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 12.50000% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/core/main.c 12.50% 14 Missing ⚠️

📢 Thoughts on this report? Let us know!

@matteius matteius changed the title Potential fixes for 3 code quality findings Protect instance signaling and container restarts Nov 26, 2026
@matteius
matteius marked this pull request as ready for review November 26, 2026 08:32
@matteius
matteius merged commit 79deb62 into main Nov 26, 2026
4 of 12 checks passed
@matteius
matteius deleted the ai-findings-autofix/src-core-main.c branch November 26, 2026 08:32
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.

1 participant