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

Ability to cancel Fetching #2183

Open
toshi0383 opened this issue Sep 26, 2017 · 5 comments
Open

Ability to cancel Fetching #2183

toshi0383 opened this issue Sep 26, 2017 · 5 comments

Comments

@toshi0383
Copy link
Contributor

Since somewhat version, I see Carthage introduced parallel fetching.
It's great, but control + C doesn't cancel these asynchronous tasks.
It should be cancellable.

@ikesyo
Copy link
Member

ikesyo commented Sep 28, 2017

Looks like this is due to Carthage/ReactiveTask#3.

@toshi0383
Copy link
Contributor Author

NSTask🙃

@BobElDevil
Copy link
Contributor

I ran into this same issue in a library I wrote for myself. The solution wasn't pretty, but it got the job done. It was 2 items:

  1. Add a signal listener to the parent process (i.e., reactive task), and whenever it receives a signal that, send it to any active child pids as well.
  2. To cover the case where the signals aren't able to be forwarded (crash, SIGKILL), spawn a tiny binary that takes as input the parent and child pid, and if the parent pid disappears, it kills the child

The best solution is probably reimplementing the task with fork/exec, but the above would be a simpler stop-gap, if desired

@stale
Copy link

stale bot commented Jun 30, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 30, 2018
@stale stale bot closed this as completed Jul 7, 2018
@ikesyo ikesyo added enhancement and removed stale labels Jul 7, 2018
@ikesyo
Copy link
Member

ikesyo commented Jul 7, 2018

Reopening this as an enhancement.

@ikesyo ikesyo reopened this Jul 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants