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

feat: ctrl+c/sigint handling and working directory override fix #27

Merged
merged 3 commits into from
Jan 10, 2024

Conversation

dav1do
Copy link
Contributor

@dav1do dav1do commented Dec 28, 2023

I added ctrl+c exit handling and made some small adjustments to running in quiet mode. Fixes issue 9

Now, we give up waiting for our futures and exit on ctrl+c. On a second ctrl+c, we give up waiting for a graceful shutdown and abort the task completely. It's possible that something is still blocking and won't yield when we request cancellation, so we may need to listen to the channel at a lower level, but for now, the top level should be sufficient. All of our tasks should be repeatable, so if we abort and re-run wheel, it should succeed or it's a bug.

Also, when a custom directory is specified, we make sure it is absolute. Before this, it was possible to fail to run the ceramic daemon as the start up script would reference a relative directory and fail to start.

Stop waiting for future and exit on ctrl+c. On a second ctrl+c, we give up on graceful shutdown and abort the task completely.
Make sure that the working directory is always an absolute path.
When using the -d option, the ceramic daemon won't run due to path issues without this change.
@dav1do dav1do requested a review from dbcfd December 28, 2023 02:29
@dav1do dav1do changed the title Feat/sigint handling feat: ctrl+c/sigint handling and working directory override fix Dec 28, 2023
@dav1do dav1do merged commit 2c89583 into main Jan 10, 2024
1 check passed
@dav1do dav1do deleted the feat/sigint-handling branch January 10, 2024 19:45
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.

Propagate ctrl-c to commands that are in flight such as installing ceramic
2 participants