Skip to content

SIGINT like pressing control-c #1537

@anki-code

Description

@anki-code

Originally posted by @jonathanslenders in xonsh/xonsh#3628 (comment):

If I recall correctly, prompt_toolkit does not set any signal handlers, because potentially it runs in a different thread (where setting signal handlers doesn't work in Python). However, it handles control-c by setting the terminal in raw mode and reading control-c literally from the input.
Would you like an external SIGINT to behave exactly like pressing control-c?
(assuming prompt_toolkit does run in the main thread.)
If so, feel free to open a issue in the prompt_toolkit issue tracker. That way I won't forget.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions