Skip to content

tempfile upgrade #762

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

Merged
merged 3 commits into from
Feb 26, 2023
Merged

tempfile upgrade #762

merged 3 commits into from
Feb 26, 2023

Conversation

Byron
Copy link
Member

@Byron Byron commented Feb 26, 2023

Tasks

  • provide low-level and high-level cleanup handlers, one that leaks and is not blocking, the other one that needs to be called from code within the process.
  • create examples to show high-level and low-level handlers in action with signal-hook
  • remove the existing ties to signal-hook
  • take a look at git-repository and make sure it's clear how handlers are supposed to be used there, maybe have a central setup() function applications should call with some options to get started quickly, without locking them out of integrating with their own interrupt handlers. Assure the latter can happen.

Maintenance

  • Upgrade to latest tempfile 3.4

…339)

This change also consolidates all signal handling into its own module called
`signal` to provide reusable handlers and as well as well as signal initialization.

Note that the functions to cleanup tempfiles don't interact with the signal registry,
hence they still can be called without the `signals` feature enabled.

Note that this change sneakily fixes a bug that could have caused a `write_all()`
on a tempfile that was removed by a signal to enter an infinite loop.
@Byron Byron linked an issue Feb 26, 2023 that may be closed by this pull request
@Byron Byron force-pushed the tempfile-upgrades branch from 259520a to c6785fc Compare February 26, 2023 17:25
@Byron Byron merged commit 3522cba into main Feb 26, 2023
@Byron Byron deleted the tempfile-upgrades branch February 26, 2023 18:09
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.

[gix-tempfile] Revisit connection to signal-hook
1 participant