Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug: CLI does not properly restore terminal state if interrupted during password input #1378

Closed
Assignees
dwahler
Labels
apiArea: HTTP APIcliArea: CLI
Milestone
@dwahler

Description

@dwahler

OS Information

  • coder --version: Coder v0.5.5-devel+97a95f1
  • OS image:coder-dogfood/master/coder-dev-ubuntu (Ubuntu 20.04.3 LTS)

Steps to Reproduce

  1. Run a command that tries to read a password from the terminal, e.g.coder login
  2. While the password prompt is waiting for input, kill the program (e.g. by pressing Ctrl-C)

Expected

The program should exit and the terminal should be restored to the same state it was in before the command was run.

Actual

The terminal's "echo" flag remains disabled, which means you can't see what you're typing into the shell until you run a command likereset to restore it.

Notes

Since we prompt for the password twice, if you make a typo entering it the first time then you're basically guaranteed to hit this bug, because the second prompt will keep asking for input until either the passwords match or the program is killed.

Of course, if we get a SIGKILL then there's nothing we can do to clean up, but we should be able to restore the terminal correctly if we receive any other signal.

Metadata

Metadata

Assignees

Labels

apiArea: HTTP APIcliArea: CLI

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp