Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

rawMode needs to be reset after exit #1805

Closed
rotorz opened this Issue Sep 30, 2011 · 8 comments

Comments

Projects
None yet
3 participants
@ghost

ghost commented Sep 30, 2011

With the current build if I do the following the terminal ceases to work:

$ node
> process.exit();
$

No further input is echoed to the terminal window. If a command like ls is entered it does show the directory listing but newlines are broken and input is still not echoed. Reseting the console doesn't work either, I have to quit the program and load it again.

This problem does not occur with the latest stable release.

terite commented Sep 30, 2011

Which version/commit of node does this?
What's the most recent version/commit that does not do this?
Which version of OS X are you on?
Does it still happen with a program like iTerm?

@ghost

ghost commented Sep 30, 2011

Which version/commit of node does this?

The master branch of this repository does it (0.5.8-pre).

What's the most recent version/commit that does not do this?

The unstable download (0.5.7) via the nodejs website.

Which version of OS X are you on?

System Version: Mac OS X 10.6.8 (10K549)
Kernel Version: Darwin 10.8.0

Does it still happen with a program like iTerm?

In iTerm the bug is slightly different. Input is echoed to the terminal BUT nothing works. So typing ls does absolutely nothing but insert a blank line on the screen (without prompt character $)

@ghost

ghost commented Sep 30, 2011

EDIT: Occasionally iTerm decides to behave exactly the same and not display any output...

I noticed something else that only applies to iTerm.

> 
> (^C again to quit)
> Leas-MacBook-Air:~ macuser$ dd
dddd
dd


ls
ls
^C0+6 records in
0+0 records out
0 bytes transferred in 145.657300 secs (0 bytes/sec)
Leas-MacBook-Air:~ macuser$ ls
Applications    Library ...

The first time I quit the prompt appears but doesn't work as shown above. The second time I attempt to quit it shows some unusual output and then the terminal restores to working order.

This does not replicate in the Mac OS terminal however.

ry commented Sep 30, 2011

raw mode isn't being reset. this is a blocker for v0.5.8

terite commented Sep 30, 2011

I can reproduce on Debian 6.0.2 bash version 4.1.5(1)

f63a1f8 - bad
f5bdce9 - good

This means it happened in the new-tty-binding branch. Investigating further shows it happened in commit 74b6426

ry commented Sep 30, 2011

don't bother investigating. it's a known problem

@ghost

ghost commented Sep 30, 2011

Thanks for confirming this ry!

A little off topic, but do you know how long it is likely to be before 0.5.8 is ready?

ry commented Sep 30, 2011

v0.5.8 will be out today or tomorrow - assuming we don't find any other major issues.

@ry ry closed this in 4e43afd Sep 30, 2011

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