Skip to content

[nextest-runner] put each test into a process group on unix #393

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

Merged
merged 2 commits into from
Jul 23, 2022

Conversation

sunshowers
Copy link
Member

@sunshowers sunshowers commented Jul 23, 2022

This allows for a process and all its child processes to be signaled
atomically.

A child process spawned by a test can choose to run in another process
group, but that's quite uncommon.

The one regression with process groups is that if you press Ctrl-C, tests no longer
exit. In the second commit we fix those regressions by forwarding Ctrl-C (and also SIGTERM/SIGHUP) to child process groups.

This should address rust-lang/miri#2421 on Unix. Going to do a similar patch on Windows as well.

This allows for a process and all its child processes to be signaled
atomically.

A child process spawned by a test can choose to run in another process
group, but that's quite uncommon.

The one regression here is that if you press Ctrl-C, tests no longer
exit. In upcoming commits we're going to fix those regressions by
forwarding Ctrl-C to child processes.
On the first ctrl-C/signal, send test processes SIGINT (or SIGTERM/SIGHUP).

On the second signal, send SIGKILL to test processes.

On the third signal, set up a panic within nextest.
@sunshowers sunshowers merged commit 4027dc9 into nextest-rs:main Jul 23, 2022
@sunshowers sunshowers deleted the pgrp-unix branch July 23, 2022 23:40
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

Successfully merging this pull request may close these issues.

1 participant