Skip to content

Can't launch IRB in TTY, no way to kill/sigstop #296

Closed

Description

@Souravgoswami

Description

Expected Behaviour: Launch IRB in TTY.

Actual Behaviour: Can't seem to launch IRB in TTY, CTRL + C, CTRL + Z, or CTRL + \ won't work. Needed to change terminal and SIGKILL.

Result of irb_info

Sorry but if I can't launch IRB, how can I paste the command?
Version:

irb 1.3.5 (2021-04-03)
Ruby: 2.7.3
Ruby Host OS: DragonflyBSD 6

Terminal Emulator

Default TTY 1 - 7 (No GUI installed on system)

Setting Files

None, first basic install.

Edit

Ok, so I can ssh to my Linux system, and run IRB. irb_info gives:

Ruby version: 2.7.3
IRB version: irb 1.3.5 (2021-04-03)
InputMethod: ReidlineInputMethod with Reline 0.2.7
RUBY_PLATFORM: x86_64-dragonfly6

Activity

  1. Souravgoswami commented on Sep 26, 2021

    @Souravgoswami
    Author

    Well, if I put --nocolorize, it still doesn't work. If I put --nomultiline it works.

  2. mrdev023 commented on Nov 18, 2021

    @mrdev023

    Same

  3. elfham commented on Dec 11, 2021

    @elfham

    I was also able to reproduce the problem on FreeBSD 13.0.
    (Ruby 2.7.4, irb 1.3.7 (2021-08-12), Reline 0.2.7, LANG=C.UTF-8)

    It seems to be stuck here:

    • Reline::Core#may_req_ambiguous_char_width
      • => Reline::IOGate#cursor_pos
        • => Reline::ANSI#cursor_pos
          • c = stdin.getc

    According to the following article, FreeBSD console does not respond to escape sequence of the cursor position.

    for example, by remote terminal:

    $ bash
    [admin@freebsd ~]$ printf '\033[6n'; sleep 1; echo
    ^[[2;1R
    [admin@freebsd ~]$ 1R
    

    by FreeBSD console:

    $ bash
    [admin@freebsd ~]$ printf '\033[6n'; sleep 1; echo
    
    [admin@freebsd ~]$ 
    

    In these situation, it seems that we have to determine ambiguous width and cursor position in some other way.

  4. added
    bug
    on Dec 27, 2022
  5. tompng commented on Oct 8, 2024

    @tompng
    Member
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions