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

poll connection #125

Merged
merged 6 commits into from May 31, 2018

Conversation

Projects
None yet
2 participants
@gaborcsardi
Member

gaborcsardi commented May 26, 2018

A special connection that can be used to poll for the termination
of the process. It is created by default if neither stdout, nor
stderr are written to a pipe, and no extra connections are passed
to the child process. It can also be forced with the poll_connection
argument.

So $poll_io() and poll() now return three-element character vectors
for processes: 'input', 'output' and 'process'.

Closes #50, closes #101.

@gaborcsardi gaborcsardi requested a review from wch May 26, 2018

@codecov-io

This comment has been minimized.

codecov-io commented May 26, 2018

Codecov Report

Merging #125 into master will increase coverage by 0.22%.
The diff coverage is 97.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #125      +/-   ##
==========================================
+ Coverage   74.44%   74.66%   +0.22%     
==========================================
  Files          30       30              
  Lines        2841     2870      +29     
==========================================
+ Hits         2115     2143      +28     
- Misses        726      727       +1
Impacted Files Coverage Δ
R/poll.R 93.33% <100%> (ø) ⬆️
R/utils.R 95.74% <100%> (+0.09%) ⬆️
R/process.R 79.66% <100%> (+0.89%) ⬆️
src/unix/processx.c 63.21% <100%> (ø) ⬆️
src/poll.c 100% <100%> (ø) ⬆️
R/initialize.R 95.08% <100%> (+0.85%) ⬆️
R/io.R 85.13% <80%> (-0.38%) ⬇️

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 bf20a3e...02ca2fc. Read the comment docs.

gaborcsardi added some commits May 26, 2018

poll connection
A special connection that can be used to poll for the termination
of the process. It is created by default if neither stdout, nor
stderr are written to a pipe, and no extra connections are passed
to the child process. It can also be forced with the `poll_connection`
argument.

So $poll_io() and poll() now return three-element character vectors
for processes: 'input', 'output' and 'process'.

Closes #50, closes #101.
Fix minor poll connection glitch
Carefule when appending an element to a list,
the element might be list itself, we don't want
to concatenate the lists.
poll connection: close child's pipe end in parent
Otherwise the child's end is not closed when the
parent exits, so poll() does not report an event.
Unix: do not close inherited fds, user needs to close
If so desired. The poll connection closes it now, so we
are good with that.

@gaborcsardi gaborcsardi force-pushed the feature/poll-anything branch from 4982e78 to e3b8bf0 May 26, 2018

@gaborcsardi gaborcsardi merged commit 17628cd into master May 31, 2018

6 checks passed

codecov/patch 97.5% of diff hit (target 74.44%)
Details
codecov/project 74.66% (+0.22%) compared to bf20a3e
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@gaborcsardi gaborcsardi deleted the feature/poll-anything branch Jun 13, 2018

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