Skip to content

Allow subprocesses to continue on after KeyboardInterrupt #406

Closed
@bitprophet

Description

@bitprophet

Semi-spinoff of #58 - some interactive programs want to handle Ctrl-C themselves, but right now, we store KeyboardInterrupt while sending the interrupt downstream, and then raise it like any other exception (as well as re-catching it and exiting 130 at the very end. Life's complicated.)

This means that mashing Ctrl-C in a REPL (even one that is itself doing except KeyboardInterrupt, if it's a Python repl!) or an editor or etc, will immediately exit, even if the subprocess itself would not have.

Ideally, fixing this will still allow us to exit with 130 if the subprocess itself does so - a quick attempt at a fix seems to not cause this (e.g. sleep 60 + Ctrl-C normally exits 130, but within run(), exits 0.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions