Skip to content

Kill with grace #367

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

Open
wants to merge 77 commits into
base: safe-cleanup
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
5ac96f6
Extract `c_processx_wait()`
lionel- Apr 19, 2023
42699d4
Implement `kill(grace = )`
lionel- Apr 19, 2023
dcb71f5
Add `cleanup_grace` argument to `run()`
lionel- Apr 19, 2023
11d37ca
Add `cleanup_grace` argument to process ctor
lionel- Apr 19, 2023
e83a48c
Use `cleanup_grace` in finaliser
lionel- Apr 27, 2023
b586b12
Poll for completion of cleanup process in unit test
lionel- Apr 27, 2023
b693822
Rbuildignore test library
lionel- Apr 27, 2023
da4cf5a
Ignore SIGPIPE while writing to fd
gaborcsardi Jun 17, 2023
a7b9ea9
Avoid strict prototype warnings on Windows
gaborcsardi Jun 30, 2023
b58e1cc
Update NEWS
gaborcsardi Jun 30, 2023
49432ca
Remove win unicode tests
gaborcsardi Jun 30, 2023
25cdd52
Merge branch 'main' of https://github.com/r-lib/processx
gaborcsardi Jun 30, 2023
2d09d47
Increment version number to 3.8.2
gaborcsardi Jun 30, 2023
25812a1
Increment version number to 3.8.2.9000
gaborcsardi Jul 1, 2023
4125a2e
RStudio -> Posit in authors
gaborcsardi Nov 3, 2023
53759eb
usethis::use_tidy_coc()
gaborcsardi Nov 3, 2023
2247366
Use pak::pak("r-lib/processx") in README
gaborcsardi Nov 3, 2023
25520ce
usethis::use_mit_license()
gaborcsardi Nov 3, 2023
5e0e880
usethis::use_tidy_description()
gaborcsardi Nov 3, 2023
d72e110
usethis::use_tidy_github_actions()
gaborcsardi Nov 3, 2023
570d663
Fix printf format string
gaborcsardi Dec 9, 2023
a539803
GHA: test on R-devel Windows
gaborcsardi Dec 10, 2023
e516059
Fix more printf() format strings, on Windows
gaborcsardi Dec 10, 2023
1ea63a1
usethis::use_github_links()
gaborcsardi Dec 10, 2023
f463f83
Redocument
gaborcsardi Dec 10, 2023
b57dc28
Increment version number to 3.8.3
gaborcsardi Dec 10, 2023
bb1fa3d
Increment version number to 3.8.3.9000
gaborcsardi Dec 10, 2023
0362a37
Add a native gcov_flush function
gaborcsardi Dec 18, 2023
861aeff
Add COPYRIGHTS file
gaborcsardi Mar 16, 2024
f0b7713
Update NEWS for release
gaborcsardi Mar 16, 2024
355747c
More copyrights updates
gaborcsardi Mar 16, 2024
956591a
Increment version number to 3.8.4
gaborcsardi Mar 16, 2024
5bb11ea
Increment version number to 3.8.4.9000
gaborcsardi Mar 17, 2024
6d12d99
CI: test on R-nect Windows
gaborcsardi Mar 31, 2024
da1c65d
Skip some failing tests temporarily
gaborcsardi Mar 31, 2024
95ba3aa
Skip the correct tests on Windows
gaborcsardi Mar 31, 2024
c3ab227
Do not use R's RNG to generate tree id
gaborcsardi Apr 2, 2024
c8ed816
Use latest GHA workflows
gaborcsardi Aug 5, 2024
e61bf67
Update test snapshots for new syntax highlighting
gaborcsardi Aug 6, 2024
3f9af6d
Fix test snapshots with both old and new cli
gaborcsardi Aug 6, 2024
f080ee0
Skip some tests in covr
gaborcsardi Aug 6, 2024
3d769d3
Skip a fragile test on GHA
gaborcsardi Aug 6, 2024
bd51c8b
Merge branch 'main' into fix/gha-latest
gaborcsardi Aug 6, 2024
d6a81d9
Merge pull request #387 from r-lib/fix/gha-latest
gaborcsardi Aug 6, 2024
b0a2a3e
Strip shared lib on Linux, if $_R_SHLIB_STRIP_=true
gaborcsardi Aug 22, 2024
3cbce84
Merge pull request #388 from r-lib/fix/strip-linux
gaborcsardi Aug 23, 2024
fb3b4d8
Update NEWS before release
gaborcsardi Jan 8, 2025
f084ec9
Fix curl fd poll tests
gaborcsardi Jan 8, 2025
6ca5da0
GHA: use debug-shell action
gaborcsardi Jan 8, 2025
bab6d3f
Simplify curl fd poll tests
gaborcsardi Jan 8, 2025
3bd3c85
Increment version number to 3.8.5
gaborcsardi Jan 8, 2025
118704a
Increment version number to 3.8.5.9000
gaborcsardi Jan 8, 2025
e190b4a
Creating a pipe does not use the RNG, on Windows
gaborcsardi Jan 28, 2025
a82463e
Make process cloneable, to avoid warnings from R6
gaborcsardi Feb 19, 2025
f542080
Update NEWS
gaborcsardi Feb 19, 2025
511dc4a
Add r-hub-ci workflow
gaborcsardi Feb 19, 2025
d762515
Increment version number to 3.8.6
gaborcsardi Feb 19, 2025
1c9500a
Increment version number to 3.8.6.9000
gaborcsardi Feb 21, 2025
dd80b0f
Make $finalize() private
gaborcsardi Feb 22, 2025
f03ce19
Upkeep 2025
gaborcsardi Apr 25, 2025
0b1e094
usethis::use_testthat(3)
gaborcsardi Apr 26, 2025
8f228ca
usethis:::use_codecov_badge("r-lib/processx")
gaborcsardi Apr 26, 2025
7178687
Add Valgrind suppression file for R-hub
gaborcsardi Apr 26, 2025
91b3949
Add ROR for Posit in DESCRIPTION
gaborcsardi Apr 26, 2025
689ba70
Use air
gaborcsardi Apr 26, 2025
2418198
Extend Valgrind suppression file
gaborcsardi Apr 26, 2025
2bbdf2d
Fix DESCRIPTION typo
gaborcsardi Apr 26, 2025
136e3f8
Switch to expect_snapshot(error = TRUE)
gaborcsardi Apr 26, 2025
d3589db
usethis::use_mit_license()
gaborcsardi Apr 26, 2025
b0c010b
usethis::use_tidy_description()
gaborcsardi Apr 26, 2025
8778aa7
usethis::use_tidy_github_actions()
gaborcsardi Apr 26, 2025
8524951
Fix platform-specific snapshot tests
gaborcsardi Apr 26, 2025
b2bae39
Add Windows test snapshots
gaborcsardi Apr 26, 2025
df05796
Merge pull request #397 from r-lib/upkeep-2025-04
gaborcsardi Apr 26, 2025
6f1ee01
Merge commit 'df0579681e7953e52174614fba8836b9a9c0afbc'
gaborcsardi Apr 26, 2025
86528ec
Code formatting
gaborcsardi Apr 26, 2025
200d27c
Adjust Linux test snapshots
gaborcsardi Apr 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
^src/processx\.dll$
^src/client\.so$
^src/client\.dll$
^src/test/sigtermignore\.so$
^src/test/sigtermignore\.dll$
^src/.*\.o$
^src/tools/px$
^src/tools/px.exe$
Expand All @@ -30,3 +32,5 @@
^src/.*[.]gcno$
^dev-lib$
^vignettes$
^[\.]?air\.toml$
^\.vscode$
2 changes: 1 addition & 1 deletion .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ representative at an online or offline event.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at codeofconduct@rstudio.com.
reported to the community leaders responsible for enforcement at codeofconduct@posit.co.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
32 changes: 18 additions & 14 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand All @@ -24,25 +25,25 @@ jobs:
config:
- {os: macos-latest, r: 'release'}

- {os: windows-latest, r: 'devel'}
- {os: windows-latest, r: 'next'}
- {os: windows-latest, r: 'release'}
# Use 3.6 to trigger usage of RTools35
- {os: windows-latest, r: '3.6'}
# use 4.1 to check with rtools40's older compiler
- {os: windows-latest, r: '4.1'}

- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-2'}
- {os: ubuntu-latest, r: 'oldrel-3'}
- {os: ubuntu-latest, r: 'oldrel-4'}
# use 4.0 or 4.1 to check with rtools40's older compiler
- {os: windows-latest, r: 'oldrel-4'}

- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-2'}
- {os: ubuntu-latest, r: 'oldrel-3'}
- {os: ubuntu-latest, r: 'oldrel-4'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -57,6 +58,9 @@ jobs:
extra-packages: any::rcmdcheck
needs: check

- uses: r-hub/actions/debug-shell@v1

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
11 changes: 7 additions & 4 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown
name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
Expand All @@ -19,8 +20,10 @@ jobs:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -39,7 +42,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
issue_comment:
types: [created]

name: Commands
name: pr-commands.yaml

permissions: read-all

jobs:
document:
Expand All @@ -13,8 +15,10 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/pr-fetch@v2
with:
Expand Down Expand Up @@ -50,8 +54,10 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/pr-fetch@v2
with:
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/rhub-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: rhub-ci.yaml

on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:

permissions: read-all

jobs:

setup:
runs-on: ubuntu-latest
outputs:
containers: ${{ steps.rhub-setup.outputs.containers }}
platforms: ${{ steps.rhub-setup.outputs.platforms }}

steps:
# NO NEED TO CHECKOUT HERE
- uses: r-hub/actions/setup@main
with:
config: clang-asan,clang-ubsan,rchk,valgrind
id: rhub-setup

linux-containers:
needs: setup
if: ${{ needs.setup.outputs.containers != '[]' }}
runs-on: ubuntu-latest
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.containers) }}
container:
image: ${{ matrix.config.container }}

steps:
- uses: r-hub/actions/checkout@main
- uses: r-hub/actions/platform-info@main
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@main
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/run-check@main
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}

other-platforms:
needs: setup
if: ${{ needs.setup.outputs.platforms != '[]' }}
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.platforms) }}

steps:
- uses: r-hub/actions/checkout@main
- uses: r-hub/actions/setup-r@main
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/platform-info@main
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@main
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/run-check@main
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
28 changes: 20 additions & 8 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
Expand All @@ -15,36 +16,47 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
covr::codecov(
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
print(cov)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v5
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
files: ./cobertura.xml
plugins: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"Posit.air-vscode"
]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"[r]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "Posit.air-vscode"
}
}
25 changes: 0 additions & 25 deletions CODE_OF_CONDUCT.md

This file was deleted.

20 changes: 12 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Package: processx
Title: Execute and Control System Processes
Version: 3.8.1.9000
Version: 3.8.6.9000
Authors@R: c(
person("Gábor", "Csárdi", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-7098-9676")),
person("Winston", "Chang", role = "aut"),
person("RStudio", role = c("cph", "fnd")),
person("Mango Solutions", role = c("cph", "fnd"))
person("Posit Software, PBC", role = c("cph", "fnd"),
comment = c(ROR = "03wc8by49")),
person("Ascent Digital Services", role = c("cph", "fnd"))
)
Description: Tools to run system processes in the background. It can
check if a background process is running; wait on a background process
Expand All @@ -16,9 +17,10 @@ Description: Tools to run system processes in the background. It can
standard output or error, with a timeout. It can also poll several
processes at once.
License: MIT + file LICENSE
URL: https://processx.r-lib.org, https://github.com/r-lib/processx#readme
URL: https://processx.r-lib.org, https://github.com/r-lib/processx
BugReports: https://github.com/r-lib/processx/issues
Depends: R (>= 3.4.0)
Depends:
R (>= 3.4.0)
Imports:
ps (>= 1.2.0),
R6,
Expand All @@ -31,12 +33,14 @@ Suggests:
curl,
debugme,
parallel,
pkgload,
rlang (>= 1.0.2),
testthat (>= 3.0.0),
webfakes,
withr
Config/Needs/website: tidyverse/tidytemplate
Config/testthat/edition: 3
Config/usethis/last-upkeep: 2025-04-25
Encoding: UTF-8
RoxygenNote: 7.2.0
Roxygen: list(markdown = TRUE)
Config/testthat/edition: 3
Config/Needs/website: tidyverse/tidytemplate
RoxygenNote: 7.3.2
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2016-2019
COPYRIGHT HOLDER: Mango Solutions, RStudio, Gábor Csárdi
YEAR: 2025
COPYRIGHT HOLDER: processx core team, see COPYRIGHTS file
Loading
Loading