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

Send interrupt to background process #127

merged 6 commits into from May 31, 2018


None yet
2 participants

gaborcsardi commented May 28, 2018

This is a SIGINT on Unix, and a CTRL+C on Windows.

It is on top of #125. Closes #126.

gaborcsardi added some commits May 27, 2018

Win: fix non-detached process cleanup
We need to attach it to the global job object
if it is not detached. This will clean it up
when the R process exits.
Implement interrupt on Windows
Sends CTRL+C currently, but easily configurable
to send CTRL+BREAK, should we need that.

This is a bit difficult to implement on windows,
because you need to attach the console of the
target process, which means that the calling
process will lose its console. So we create a
subprocess just for this, this is apparently
the only clean solution. We run the child
process synchronously, it is fairly fast, about
~ 0.05s.

@gaborcsardi gaborcsardi force-pushed the feature/interrupt branch from 6c76e95 to 0f675cb May 31, 2018


This comment has been minimized.

codecov-io commented May 31, 2018

Codecov Report

Merging #127 into master will decrease coverage by 0.42%.
The diff coverage is 21.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #127      +/-   ##
- Coverage   74.56%   74.13%   -0.43%     
  Files          30       30              
  Lines        2870     2892      +22     
+ Hits         2140     2144       +4     
- Misses        730      748      +18
Impacted Files Coverage Δ
src/init.c 100% <ø> (ø) ⬆️
src/unix/processx.c 62.87% <0%> (-0.35%) ⬇️
R/process.R 73.43% <0%> (-6.23%) ⬇️
src/win/processx.c 81.11% <33.33%> (-0.33%) ⬇️
R/utils.R 92.15% <50%> (-3.59%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17628cd...0f675cb. Read the comment docs.

@gaborcsardi gaborcsardi merged commit 1b8cbb3 into master May 31, 2018

4 of 6 checks passed

codecov/patch 21.73% of diff hit (target 74.56%)
codecov/project 74.13% (-0.43%) compared to 17628cd
continuous-integration/appveyor/branch AppVeyor build succeeded
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@gaborcsardi gaborcsardi deleted the feature/interrupt branch Jun 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment