Skip to content
This repository has been archived by the owner. It is now read-only.

`node < /dev/tty` doesn't seem to work as expected on OSX #3072

Closed
TooTallNate opened this issue Apr 7, 2012 · 20 comments
Assignees

Comments

@TooTallNate
Copy link

@TooTallNate TooTallNate commented Apr 7, 2012

https://gist.github.com/681256e480d4e8eae52d

Basically, I'm expecting to enter the REPL as usual, and basically the initial prompt gets printed and no keyboard input gets recognized at all.

read(1) seems to work as expected (as seen in the gist), so I would think at least in NODE_NO_READLINE mode would as, but that doesn't seem to work either.

This seems to only happen on OS X and works fine on Ubuntu.

@TooTallNate

This comment has been minimized.

Copy link
Author

@TooTallNate TooTallNate commented Apr 7, 2012

After further investigation this appears to have been fixed by b6d6a54, which will be in the v0.7.8 release.

@isaacs

This comment has been minimized.

Copy link

@isaacs isaacs commented Apr 9, 2012

b6d6a54 was reverted by 93eca95, because it caused #3075. Need to find another way to fix this.

@TooTallNate

This comment has been minimized.

Copy link
Author

@TooTallNate TooTallNate commented Apr 11, 2012

It seems like applying -mmacosx-version-min=10.5 fixed things up until 0db4dc0 was applied. Now it seems like the flag doesn't help anymore, and I still get the hang on ./node < /dev/tty. /cc @bnoordhuis

@TooTallNate

This comment has been minimized.

Copy link
Author

@TooTallNate TooTallNate commented Apr 16, 2012

Appears to be fixed now.

@TooTallNate

This comment has been minimized.

Copy link
Author

@TooTallNate TooTallNate commented May 27, 2012

This seems to be happening again using node master (82bcdbb). Only now it's worse, getting an assertion failure from within libuv:

☮ ~/node (master) ⚡ ./node < /dev/tty
> Assertion failed: (!!(events & UV__IO_READ) ^ !!(events & UV__IO_WRITE)), function uv__stream_io, file ../deps/uv/src/unix/stream.c, line 730.
Abort trap: 6

/cc @bnoordhuis

@TooTallNate TooTallNate reopened this May 27, 2012
@bnoordhuis

This comment has been minimized.

Copy link
Member

@bnoordhuis bnoordhuis commented May 27, 2012

@TooTallNate: WFM. To wit:

$ out/Debug/node < /dev/tty
> 1+1
2
> 2+2
4
@isaacs

This comment has been minimized.

Copy link

@isaacs isaacs commented May 27, 2012

It works on linux and sunos, not on osx.

@isaacs isaacs closed this in 93eca95 Jun 4, 2012
@TooTallNate TooTallNate reopened this Jun 12, 2012
@TooTallNate

This comment has been minimized.

Copy link
Author

@TooTallNate TooTallNate commented Jun 12, 2012

Still happens as of v0.7.10:

$ node -v
v0.7.10
$ node < /dev/tty
> Assertion failed: (!!(events & UV__IO_READ) ^ !!(events & UV__IO_WRITE)), function uv__stream_io, file ../deps/uv/src/unix/stream.c, line 732.
Abort trap: 6
@TooTallNate

This comment has been minimized.

Copy link
Author

@TooTallNate TooTallNate commented Jun 13, 2012

git bisect says that 37fd953 (a.k.a joyent/libuv@3c41597) broke it again.

@bnoordhuis

This comment has been minimized.

Copy link
Member

@bnoordhuis bnoordhuis commented Jul 4, 2012

@TooTallNate Sorry, I kind of lost track of this issue. Does it still happen?

@TooTallNate

This comment has been minimized.

Copy link
Author

@TooTallNate TooTallNate commented Jul 4, 2012

Yes, still happens. I'll ship you a six pack of beer to fix it ;)

On Wednesday, July 4, 2012, Ben Noordhuis wrote:

@TooTallNate Sorry, I kind of lost track of this issue. Does it still
happen?


Reply to this email directly or view it on GitHub:
#3072 (comment)

@ghost ghost assigned bnoordhuis Jul 4, 2012
@bnoordhuis

This comment has been minimized.

Copy link
Member

@bnoordhuis bnoordhuis commented Jul 4, 2012

Deal. :-) I'll work on it next week - I sent my old MBP back to Joyent and I haven't bought a new one yet.

@brntbeer

This comment has been minimized.

Copy link

@brntbeer brntbeer commented Aug 7, 2012

👍 for @bnoordhuis to fix it 3 weeks ago

@chewbranca

This comment has been minimized.

Copy link

@chewbranca chewbranca commented Aug 17, 2012

Ran into this as well on OSX 10.7. Would love to see this fixed!

@indutny

This comment has been minimized.

Copy link
Member

@indutny indutny commented Aug 17, 2012

Fix is there, still polishing it out: https://github.com/joyent/libuv/pull/528/files

@TooTallNate

This comment has been minimized.

Copy link
Author

@TooTallNate TooTallNate commented Aug 27, 2012

Fixed in master.

@TooTallNate TooTallNate referenced this issue Jan 2, 2013
@TooTallNate

This comment has been minimized.

Copy link
Author

@TooTallNate TooTallNate commented Jan 2, 2013

So I guess @indutny's select() stuff got reverted? This happens again now with v0.9.4.

@TooTallNate TooTallNate reopened this Jan 2, 2013
@indutny

This comment has been minimized.

Copy link
Member

@indutny indutny commented Jan 2, 2013

Ah, no. it doesn't.

@indutny

This comment has been minimized.

Copy link
Member

@indutny indutny commented Jan 2, 2013

@TooTallNate

This comment has been minimized.

Copy link
Author

@TooTallNate TooTallNate commented Jun 4, 2013

Works as expected in node v0.10.7 (just the version I was on at the moment, it's probably been fixed for a while). Closing.

@TooTallNate TooTallNate closed this Jun 4, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
6 participants
You can’t perform that action at this time.