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

readline steals sigwinch #48198

Closed
shish mannequin opened this issue Sep 23, 2008 · 3 comments
Closed

readline steals sigwinch #48198

shish mannequin opened this issue Sep 23, 2008 · 3 comments
Labels
extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@shish
Copy link
Mannequin

shish mannequin commented Sep 23, 2008

BPO 3948
Nosy @devdanzin, @vadmium
Superseder
  • bpo-2675: Curses terminal resize problems when Python is in interactive mode
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2016-05-15.00:57:41.321>
    created_at = <Date 2008-09-23.20:59:29.156>
    labels = ['extension-modules', 'type-bug']
    title = 'readline steals sigwinch'
    updated_at = <Date 2016-05-15.00:57:41.269>
    user = 'https://bugs.python.org/shish'

    bugs.python.org fields:

    activity = <Date 2016-05-15.00:57:41.269>
    actor = 'martin.panter'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-05-15.00:57:41.321>
    closer = 'martin.panter'
    components = ['Extension Modules']
    creation = <Date 2008-09-23.20:59:29.156>
    creator = 'shish'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 3948
    keywords = []
    message_count = 3.0
    messages = ['73667', '87949', '265563']
    nosy_count = 3.0
    nosy_names = ['ajaksu2', 'shish', 'martin.panter']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'test needed'
    status = 'closed'
    superseder = '2675'
    type = 'behavior'
    url = 'https://bugs.python.org/issue3948'
    versions = ['Python 2.7', 'Python 3.3', 'Python 3.4']

    @shish
    Copy link
    Mannequin Author

    shish mannequin commented Sep 23, 2008

    I have an app which wants to use a mostly curses interface with some
    parts readline, however, doing so much as "import readline" causes
    readline to claim ownership of sigwinch, thus breaking the ability of
    the app to resize.

    Worse, it seems to claim it at the C level -- doing signal.getsignal
    (signal.SIGWINCH) returns SIG_DFL, so I can't see anything I can do at
    the python level to manually set the signals to be handled in the way I
    want :-/

    I would think it best to set the handler at the start (for
    compatability, and because the vast majority of apps will expect it
    that way), but set it via python's signal module, so that app writers
    can take the signal handler and call it in their own way (In my case, I
    want the app to listen for the signal, and the app's handler will call
    readline's and curses's handlers in turn)

    @shish shish mannequin added extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error labels Sep 23, 2008
    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented May 17, 2009

    See related(?) bpo-3180.

    @vadmium
    Copy link
    Member

    vadmium commented May 15, 2016

    Is this actually about how SIGWINCH handlers are installed, or is it a complaint about readline affecting how curses handles resize events? I am assuming this is about handling resize events, so is a duplicate of bpo-2675.

    If it is specifically about SIGWINCH, I understand Gnu Readline recently changed its SIGWINCH handling so that it only installs the handler when it is active. As a result, we recently changed Python to install its own SIGWINCH handler on behalf of Readline (bpo-23735). But I understand in both cases, the handler for Readline chain calls the original handler, so there should be no problem.

    @vadmium vadmium closed this as completed May 15, 2016
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant