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

Avoid double sending of SIGINT to subprocesses #889

Merged
merged 1 commit into from
Jan 14, 2023

Commits on Jan 13, 2023

  1. Avoid double sending of SIGINT to subprocesses

    Standard bash behavior when pressing Ctrl+C is to send SIGINT to the
    foreground process group. This combines well with standard fork behavior
    because subprocesses are started in the same group, so a multi-process
    program is correctly terminated without any explicit signal handling.
    
    It however does not work well in cases where signals are handled
    explicitly like here, because on Ctrl+C the subprocesses receive two
    SIGINTs - one directly from the shell and one from the interrupt handler
    in the `CLI` class. This in turn can prevent graceful shutdown in the
    subprocesses.
    
    The specific example that prompted this fix was interrupting feature
    specs using selenium. In case of a double interrupt the browser process
    will sometimes remain running after rspec is terminated.
    rdokov committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    b4c238b View commit details
    Browse the repository at this point in the history