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

gixp pack-create does not terminate on ctrl-c when reading from stdin #92

Closed
edward-shen opened this issue May 24, 2021 · 2 comments
Closed
Assignees

Comments

@edward-shen
Copy link
Contributor

Repro steps:

  • ./gixp pack-create > /dev/null

The global handler (from git-features) will respond correctly but the process will refuse to terminate until EOF (ctrl-d) is provided.

I believe the "hanging" behavior is attributed to .lines() call in gitoxide-core/pack/create.rs:L89 as that call will continue to read from the buffer until EOF.

Not sure what the best solution is here, since the global handler implies it will terminate but it never actually does, but on the other hand this isn't quite a user facing tool, so they might realize they just need to send an EOF to stop it.

@Byron Byron self-assigned this May 24, 2021
Byron added a commit that referenced this issue May 24, 2021
In 'small' for instance, the program will be terminated as there is
no global interrupt handler.

In other builds, we have to prevent it from hanging ourselves by
checking for interrupts or by avoiding getting into situations
where we do blocking reads/writes.

Related to #92
@Byron
Copy link
Owner

Byron commented May 24, 2021

Please try again - it should work now.

@edward-shen
Copy link
Contributor Author

LGTM!

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

No branches or pull requests

2 participants