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

Allow to register exit handlers #229

Open
lstocchi opened this issue Nov 27, 2024 · 1 comment · May be fixed by #230
Open

Allow to register exit handlers #229

lstocchi opened this issue Nov 27, 2024 · 1 comment · May be fixed by #230
Assignees

Comments

@lstocchi
Copy link
Contributor

lstocchi commented Nov 27, 2024

In the current code base we already handle the interrupt signals in the virtionet.go file. However we could need to listen to them in other parts of the code (e.g in the ignition part to delete the socket created)

func registerExitHandler(handler func()) {

We should centralize it so that it is possible to register multiple exit handlers that will be executed in one place.

@lstocchi lstocchi self-assigned this Nov 27, 2024
@lstocchi lstocchi moved this to Work In Progress in Project planning: crc Nov 27, 2024
@cfergeau
Copy link
Collaborator

Yup, would be useful to generalize this. Iirc there are several go modules doing this, each with their own caveats ;)

@lstocchi lstocchi linked a pull request Nov 29, 2024 that will close this issue
@lstocchi lstocchi moved this from Work In Progress to Ready for review in Project planning: crc Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for review
Development

Successfully merging a pull request may close this issue.

2 participants