Skip to content

[repo-assist] fix: clean up ALPM lock on interrupt - #2962

Open
github-actions[bot] wants to merge 1 commit into
nextfrom
repo-assist/fix-issue-2918-sigint-cleanup-20260808-5dc74a39bcbd3d56
Open

[repo-assist] fix: clean up ALPM lock on interrupt#2962
github-actions[bot] wants to merge 1 commit into
nextfrom
repo-assist/fix-issue-2918-sigint-cleanup-20260808-5dc74a39bcbd3d56

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🤖 This PR was prepared by Repo Assist, an automated AI assistant for this repository.

Closes #2918

Root cause

The process used context.Background() while relying on deferred dbExecutor.Cleanup(). Go terminates immediately on the default SIGINT path, so Ctrl+C bypassed deferred cleanup and could leave /var/lib/pacman/db.lck behind.

Fix

  • Use signal.NotifyContext for SIGINT at process entry.
  • Let cancellation propagate through the existing context-aware operations so normal deferred cleanup runs.
  • Add a regression test that verifies an interrupt cancels the application context.

Test Status

  • go test . -count=1 — passed
  • make build — passed
  • make lint — not run successfully because golangci-lint is unavailable in the environment

No new dependencies were added.

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@1c6668b751c51af8571f01204ceffb19362e0f66

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Jguer
Jguer marked this pull request as ready for review August 10, 2026 13:39
@Jguer
Jguer self-requested a review as a code owner August 10, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CTRL+C while yay is syncing while running as root exits but does not remove db.lck

0 participants