Skip to content

Reline hangs on Windows 11 when previously calling Open3 #827

Closed

Description

@adfoster-r7

Hi there 👋

Just thought I'd cross-reference this Windows 11 issue that folk been hitting when using Open3 and IRB/Reline together:

oneclick/rubyinstaller2#288

I'm not sure if this is a Reline specific issue, but I thought I would reference it just incase 👍

Activity

  1. elfham commented on May 18, 2025

    @elfham
    Contributor

    oneclick/rubyinstaller2#288 (comment)

    Reline outputs the character ▽ to the terminal to identify the character width of the terminal.

    output.write "\u{25bd}"

    It seems to be stuck at this point.

  2. tompng commented on May 18, 2025

    @tompng
    Member

    Similar issue is reported in #545 #676.

    And I think it is fixed with #734 and released as v0.5.10 in September 05, 2024.

    Please let us know if issue still exist in the latest Reline.
    According to the past investigation, it happens after popen or backtick, and perhaps any external command execution. At least one of the cause is fixed in v0.5.10.
    Since I have no idea of the cause (and no windows machine), it'd be very helpful if someone could debug it.

  3. johnnyshields commented on Aug 1, 2025

    @johnnyshields

    I confirmed this issue is not yet fixed. It still happens on Windows 11 with:

    RUBY_VERSION #=> "3.4.4"
    Reline::VERSION #=> "0.6.2"
    IRB::VERSION #=> "1.15.2"
    

    On Windows I can reproduce it by running the following in IRB:

    Open3.capture3('git status')
    
  4. YO4 commented on Dec 9, 2025

    @YO4
    Contributor

    I was able to reproduce a similar situation.
    irb killed silently when Open3.capture3('git status') entered.

    This occurs when using Microsoft's Application Verifier with ruby.
    Similar debuggers or process monitors may have been running in other cases as well.
    The error is likely being masked by some layer, so it doesn't usually show up.

    The cause appears to be that when ruby performs a redirect, dup2 overwrites the standard handle, causing the original handle to be closed.

    Passing HANDLE_FLAG_PROTECT_FROM_CLOSE to SetHandleInformation did not improve the situation, so I will try duplicating the handle.

  5. YO4 commented on Dec 10, 2025

    @YO4
    Contributor

    I posted PR #875.

    I have resolved the issue on my end, but since the occurrence varies depending on the environment, we need other examples.
    I'll also report it to oneclick/rubyinstaller2#288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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