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

CLI: Terminal becomes no-echo if not entering REPL mode or exiting without Ctrl+D #2900

Open
1 task done
Huy-Ngo opened this issue Jan 11, 2024 · 3 comments
Open
1 task done
Labels

Comments

@Huy-Ngo
Copy link
Contributor

Huy-Ngo commented Jan 11, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When running sanic in development mode without turning off REPL, that is, sanic --dev server, if I don't enter the REPL mode before exiting, the terminal becomes no-echo (what I type does not shows on screen). (This can be turned off by running stty echo, but it shouldn't happen in the first place.)

Steps to reproduce:

  1. Run sanic in development mode without REPL disabled: sanic --dev server
  2. Do one of the following:
  • Exit the server immediately with Ctrl+C
  • Enter the REPL, then exit with Ctrl+C
  • Enter the REPL, then exit with exit()

The terminal does not becomes no-echo if I enter the REPL, then exit with Ctrl+D

Expected Behavior

The terminal is not in no-echo mode.

How do you run Sanic?

Sanic CLI

Operating System

Linux

Sanic Version

23.12.0

@Huy-Ngo Huy-Ngo added the bug label Jan 11, 2024
@Huy-Ngo
Copy link
Contributor Author

Huy-Ngo commented Jan 11, 2024

Maybe this have something to do with input() at sanic/cli/console.py:220 being interrupted not handled correctly?

@Huy-Ngo Huy-Ngo changed the title CLI: Terminal becomes no-echo if not entering REPL mode CLI: Terminal becomes no-echo if not entering REPL mode or exiting without Ctrl+D Jan 11, 2024
@ahopkins
Copy link
Member

ahopkins commented Apr 7, 2024

What version of Linux are you on? This is not my experience at all using Arch.

@Huy-Ngo
Copy link
Contributor Author

Huy-Ngo commented Apr 7, 2024

I'm using Alpine Linux. Using its own libc and coreutils, I suppose it cause this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants