Skip to content

Signal Handling #3150

Closed Answered by pmatilai
nealef asked this question in Q&A
Jun 6, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Sorry for the late response.

The question is somewhat rpm version dependent: rpm versions >= 4.18 do not mess with signal delivery, but older versions indeed do due to Berkeley DB requirements. Various signals get hijacked by rpm at the time of rpmdb open, and should be returned to previous state when the db and all cursors are closed. What it comes down to is basically ensuring match iterators (mi in your example) or transaction sets linger around.

The former is best ensured by avoiding placing them in variables in the first place, eg use this instead:

for h in ti.dbMatch("name", "docker-ce"):
    print(h)

The database connection is hidden behind the ts object, it'll get garbage collect…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nealef
Comment options

Answer selected by pmatilai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants